PDA

View Full Version : Date References to save files using VBA Code



mrmmickle1
11-28-2012, 09:42 AM
Is there an easy way to save a file with todays date?

For Example Customer Service Report "&Date&" or something to that effect "Today()" but in code where it would make the file unique?

snb
11-28-2012, 02:37 PM
Sub M_snb()
thisworkbook.saveas "G:\OF\voorbeeld_" & format(date,"ddmmyyyy") & ".xlsx",51
End Sub

mrmmickle1
11-28-2012, 05:39 PM
snb,

Thank you again! I am learning slowly but surely. I appreciate the help.

The 51 specifies .xlsx format correct?

-Matt

snb
11-28-2012, 05:48 PM
Yes, you do !

Ckeck that in the VBEditor's help files, lemma saveas / fileformat