December 5, 2016
I tried follow vb script, but not work, can some one hlep to rectify
Sub File_Save()
ActiveSheet.Name = Format(Now, "dd-mmm-yyyy")
Range("A1").Select
ActiveWorkbook.SaveAs Filename:="D:\AGE00OH2104\AMC\" & ActiveSheet.Name & ".xls", FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False
Application.DisplayAlerts = Flase
ActiveWorkbook.Close
Range("A1").Select
End Sub
October 5, 2010
Hi David,
How exactly does it not work? If you are getting an error you need to tell us what it is.
When I try this code it works fine, with some minor modifications, like removing the Select statements.
I do have to change the save path from D:\AGE00OH2104\AMC\ to something that exists on my PC. Does that folder/path exist on your PC?
Sub File_Save()
ActiveSheet.Name = Format(Now, "dd-mmm-yyyy")
ActiveWorkbook.SaveAs Filename:="D:\AGE00OH2104\AMC\" & ActiveSheet.Name & ".xls", FileFormat:=xlNormal
ActiveWorkbook.Close
End Sub
Are you sure you want a .xls file? Because your saving a macro in the workbook. I'm using Excel 2013, not sure what version you have. Check the file formats
https://docs.microsoft.com/en-.....fileformat
Regards
Phil
December 5, 2016
Thanks so much Philip!
Yes , agreed it works with a separate file but not work in a Macro workbook.
I capture the screen for reference but sorry they are in Chinese, basically it tells the property of the syntex is not well defined or something like the
parameter is not correctly set
1 Guest(s)