counterscc
Board Regular
- Joined
- Mar 6, 2006
- Messages
- 119
Hello - I run a macro daily and I end up saving the file the same thing everyday but with that days date at the end of the file name. Is there a way to build this into a macro? Thanks
ActiveWorkbook.SaveAs Filename:= _
ActiveWorkbook.Path & "\" & "AR Return Credits 1 - " & Format(Date, "mm-dd-yy") & ".xls", FileFormat:= _
xlExcel8, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, CreateBackup:=False
Thanks for your help Jason. I think I may be doing this incorrectly. What I did was I opened a new file and saved it on my desktop as Book1.xls. I then created a new macro and pasted in the code from your post and then ran the macro in hopes that it would save another copy of my file as AR Return Credits 1 - 03-23-09.xls but I got another error message.
Run-Time error '1004':
Method 'SaveAs' of object '_Workbook' failed
Is there something wrong with the way I am testing it? Thanks again for your help on this. I greatly appreciate it