Have current date display in File Name

P

ploddinggaltn

I use this code to save my file as Payable with the current date. I would
like the date to display first and I just can't seem to get it to work, how
do I code the date to display first in the file name. Thanks


ActiveWorkbook.SaveAs Filename:= _
"C:\Payable\Payable " & _
Format(Now, "MM-DD-YYYY") & ".xls", _
FileFormat:=xlExcel5, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False
 
D

darrenmcconachie

Is this what you're after...

ActiveWorkbook.SaveAs Filename:= _
"C:\Payable\" & Format(Now, "MM-DD-YYYY") & " Payable.xls", _
FileFormat:=xlExcel5, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False

Regards
Darren
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top