PDA

View Full Version : Saving an activeworkbook as a time stamp



j.smith1981
05-04-2009, 06:19 AM
I am having some compatibility issues with office 2003 and office 2007.

I think there may be a problem in the operating system too like the difference between vista and xp just wanted to get it clear in my head.

Does anyone have any good sites or references in how to format a file in all versions?

What i was wanting was like say 'report_11_15_20_12_2008.csv'

Where the first 11 is the hour it was generated, 15 is the minute it was generated, 20 was the day it was generated and the month and finally the year.

Can someone help please?

Thanks,
Jeremy.

Bob Phillips
05-04-2009, 07:33 AM
What exactly is the issue?

p45cal
05-04-2009, 07:46 AM
I don't have 2007 but I use
NewName = Left(ThisWorkbook.Name, Len(ThisWorkbook.Name) - 4) & " " & Format(Now, "dd mmm yyyy hh_mm_ss")
NewName = "C:\Archived Files\" & NewName & ".xls"
ThisWorkbook.SaveCopyAs NewName I would have expected 2007 to yield the same result; to get your time stamp in the same format use
format(Now,"hh_mm_dd_mm_yyyy") You're not making it very clear what the problem might be though...