![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Apr 2002
Location: NY, NY
Posts: 31
|
With minute variations and edits from version to version, keeping soft and hard copies of generations of spreadsheets can be challenging.
I already name the files as FILE20020429 but are their other ways to track versions? Thanks for any brainstorming you can provide! |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Millbank, London, UK
Posts: 1,790
|
include the time in the filename ?
thusly YYYYMMDDHHMM.xls I'm sure the VBA guys could ship up somethign that does this at the touch of a button edit........ typo : I meant "whip up something" [ This Message was edited by: Chris Davison on 2002-04-29 13:42 ] |
|
|
|
|
|
#3 |
|
MrExcel MVP
Join Date: Mar 2002
Location: Chicago, IL USA
Posts: 2,042
|
Following Chris' suggestion, use the following as the Filename in your SaveAs code.
Format(Now, "YYYYMMDDHHMM") & ".xls" The .xls may not be necessary, so give this a try with and without that part. Bye, Jay |
|
|
|
|
|
#4 |
|
New Member
Join Date: Apr 2002
Location: NY, NY
Posts: 31
|
I must profess ignorance:
What do you mean by the "SaveAs code?" Thanks for the help! |
|
|
|
|
|
#5 |
|
MrExcel MVP
Join Date: Mar 2002
Location: Chicago, IL USA
Posts: 2,042
|
Hi,
1. Copy the routine posted below 2. Right click on the Excel icon at the top of the window, next to the File option in the worksheet menu bar 3. Choose View Code 4. Paste the copied routine '---------------- Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) Dim StrNameFile As String StrNameFile = "FILE" & Format(Now, "YYYYMMDDHHMM") & ".xls" ThisWorkbook.SaveAs FileName:=StrNameFile End Sub '--------------- Whenever you click the save button, this will save the workbook with the file name/date/time. Bye, Jay |
|
|
|
|
|
#6 |
|
New Member
Join Date: Apr 2002
Location: NY, NY
Posts: 31
|
By the way, this worked and I've incorporated the code in several macros I've created since.
Thanks. |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|