Place this into a normal module of the file:
Sub auto_open()
Dim strDate As String
Dim MyPath, MyName, MyFullName, MyExt, ThisXL
Dim Countt
ThisXL = Application.Version
MyPath = Application.ActiveWorkbook.Path
Countt = Len(ActiveWorkbook.Name)
MyName = Left(ActiveWorkbook.Name, InStrRev(ActiveWorkbook.Name, ".") - 1)
MyExt = Right(ActiveWorkbook.Name, Countt - InStrRev(ActiveWorkbook.Name, ".") + 1)
'strDate = Format(Range("DateTdy"), "yyyy-mm-dd")
strDate = Format(Date, "yyyy-mm-dd")
MyFullName = MyName & "_" & strDate & MyExt
Response = MsgBox("This will create a copy of this workbook under the name of " & MyFullName & " . Proceed?", vbYesNo, "CreateBackup")
If Response = vbYes Then
ActiveWorkbook.SaveCopyAs Filename:=MyPath & "\" & MyName & "_" & strDate & MyExt
End If
End Sub
On opening the file the above macro should run and will offer the user to save the file under filename & Date.
Will be saved into same directory.
I hope this helps.
Bookmarks