View Single Post
  #2   Report Post  
Dave Peterson
 
Posts: n/a
Default

dim myFileName as string
myfilename = "C:\" & format(now,"yyyymmdd_hhmmss") & ".xls"
Activeworkbook.saveas filename:=myfilename, fileformat:=xlworkbooknormal

Or something like that.

smoran wrote:

Hello,

I need a macro that will automatically save an excel file, with a
unique file name each time, it would be good if it could put the date
and time into the file name. If its not possible to put the date and
time into the file name, then just generating a unique file name will
be enough.

How would I go about doing this ?

Regards

Stephen

--
smoran
------------------------------------------------------------------------
smoran's Profile: http://www.excelforum.com/member.php...o&userid=27753
View this thread: http://www.excelforum.com/showthread...hreadid=472964


--

Dave Peterson