Ark68
Well-known Member
- Joined
- Mar 23, 2004
- Messages
- 4,564
- Office Version
- 365
- 2016
- Platform
- Windows
I have two workbooks that I fear other users may unintentionally change and then save the changes that shouldn't have been made.
Is there a way that when the users opens the workbook, before they have a chance to monkey with it, that original workbook is saved elsewhere with a different name?
I thought this ...
This might work, but it will change the name of the activeworkbook, which will cause all kinds of problems in code needing the original file's name.
The second workbook isn't open yet. Is there a way I can copy it from it's directory, pasted into a second directory and renamed?
Is there a way that when the users opens the workbook, before they have a chance to monkey with it, that original workbook is saved elsewhere with a different name?
I thought this ...
Code:
dt = Format(Now(), "dd-mmm-yy hh:mm:ss")
myFileName = ActiveWorkbook.Name & dt
ActiveWorkbook.SaveAs Filename:=myFileName, FileFormat:=xlWorkbookNormal, Password:="31286", addToMru:=False
This might work, but it will change the name of the activeworkbook, which will cause all kinds of problems in code needing the original file's name.
The second workbook isn't open yet. Is there a way I can copy it from it's directory, pasted into a second directory and renamed?