View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
mike mike is offline
external usenet poster
 
Posts: 216
Default Save date in filename

Rob:

Thanks for your reply. When I try this, I get a run time
error. It says it cannot access the file ....
\Archive\Log File-2\23.

It appears as if it is treating the slashes in the date
as directory paths ... Any ideas?

Thanks,
Mike.

-----Original Message-----
"Log file-" & Date

--
Regards;
Rob
---------------------------------------------------------

---------------
"Mike" wrote in

message
...
Hi. I would like to have the current date saved in the
filename when the macro is excercised.

For instance, the filename is "Log File.xls". I would
like a command that, if executed on February 23, it

would
save the filename "Log File - 2/23/04.xls.

My current command is:

ActiveWorkbook.SaveAs Filename:=ThisWorkbook.Path
& "\Archive\" & "Log File"

What should I add to this command to include the date?

Thanks,
Mike.



.