Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
smoran
 
Posts: n/a
Default Automatic File Saving


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

  #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
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I recover deleted entries after saving a file? Pinoy_bart Excel Discussion (Misc queries) 2 August 1st 05 12:55 PM
saving file as text(tab delimited)... Sevgi Excel Discussion (Misc queries) 1 April 6th 05 07:04 PM
How do I stop Excel 2000 from saving file history from file that . Cathy Excel Discussion (Misc queries) 0 March 29th 05 03:27 PM
saving excel file as tab delimited Craig Hilliard Excel Discussion (Misc queries) 0 February 1st 05 10:39 PM
Saving a Excel 97 file into Excel 2003 file Wil Excel Discussion (Misc queries) 1 December 13th 04 11:51 PM


All times are GMT +1. The time now is 02:29 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"