Excel macro: Add date to file name
Posted on 2002-04-23
I've got an excel macro that I run that saves a file. What I need to do is add the current date to the file name so that I can have an archive of all the log files instead of writing over my log file. The snippet of code is below.
Working correctly, the macro would save the file named below as "042302log_rsa.xls"
ActiveWorkbook.SaveAs Filename:= _
"log_RSA.xls", FileFormat:= _
xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False _