Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
sd sd is offline
external usenet poster
 
Posts: 9
Default Save File with the current date and time.

How can I save a file with the file name as the current date and time?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Save File with the current date and time.

Hi SD,

Try:

'=============
Public Sub Tester04A()

ActiveWorkbook.SaveAs _
Filename:=Format(Now, "yyyymmdd hh-mm") & ".xls", _
FileFormat:=xlWorkbookNormal

End Sub
'<<=============


---
Regards,
Norman


"sd" wrote in message
ups.com...
How can I save a file with the file name as the current date and time?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Save File with the current date and time.

Hi Norman,
Just wanted to extend the question. Is there a way whereby:

Step 1- You run a macro for a workbook once where you also specify a
new path
Step 2- After running this macro, Excel creates a backup file for the
selected workbook at the path which you have mentioned in Step 1
Step 3- Now whenever you save the file (Using normal CTRIL+S or
File-Save command), an updated Backup copy of the workbook is created
at the specified path with date and time in the file name.

I want to have the macro so that I can understand the logic and then
customise it for my requirements.

Thanks in advance.

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
Can you make excell automaticaly save to the current date & time? Jim Excel Discussion (Misc queries) 3 May 17th 07 04:49 PM
Save File with Date and Time Stamp Andibevan[_3_] Excel Programming 9 May 4th 06 01:17 AM
Save as Current Date / Time Jacob_F_Roecker Excel Discussion (Misc queries) 1 October 25th 05 09:37 AM
Save Workbook as Current Date/Time Jacob_F_Roecker Excel Discussion (Misc queries) 1 October 25th 05 09:37 AM
Save file with time date stamp oberon.black[_91_] Excel Programming 1 September 22nd 05 01:13 AM


All times are GMT +1. The time now is 11:48 PM.

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"