Good morning,
I have written the script for this autosave using one button and I keep getting an error message which highlights the
ActiveWorkbook.SaveAs Filename:= _ fileSaveName, FileFormat:=xlNormal, _ CreateBackup:=False
and I cannot see where the problem lies. Would anyone be able to help please. The full script is underneath:-
Sub Picture7_Click()
Application.DisplayAlerts = False
template_file = ActiveWorkbook.FullName
fileSaveName = Application.GetSaveAsFilename( _
InitialFileName:="C:\Users\robert.french\Excel spreadsheets\Event job booking\Inventory\filename_" + VBA.Strings.Format(Now) + ".xls", _
fileFilter:="Xls Files (*.xls), *.xls")
If fileSaveName = False Then
Exit Sub
End If
ActiveWorkbook.SaveAs Filename:= _
fileSaveName, FileFormat:=xlNormal, _
CreateBackup:=False
file_name_saved = ActiveWorkbook.Filename
MsgBox "Your Event No.upload file has been successfully created at: " & vbCr & vbCr & file_name_saved
ActiveWorkbook.SaveAs Filename:= _
template_file, FileFormat:= _
xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False _
, CreateBackup:=False
Application.DisplayAlerts = True
End Sub
Many Thanks
Robbosan![]()
Bookmarks