Hi Vicki, I don't understand your question. Are you saying the string you have posted is not working for you (because it shouldn't be working, the correct syntax is, ActiveWorkbook.Close Savechanges:=True, note that I added an equal sign)?
Barrie
Barrie - thanks for your reply. I changed the : to = but still shows red, so an error. Here is what the file has:
ActiveWorkbook.SaveAs FileName:= _
"O:\cp50601b\SHARED\CLUBS\P&LS\2001 P & L\2nd Qtr\1AAADCBOSv.xls", SaveChanges=true, FileFormat _
:=xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:= _
False, CreateBackup:=False
Vicki, the reason it is showing red is because SaveChanges is not a valid argument for the command. Are you trying to use this argument so you don't get a message box prompting the user if they want to save changes? If yes, try using:
Application.DisplayAlerts = False
just before your save command and put:
Application.DisplayAlerts = True
after your save command.
The DisplayAlerts command instructs Excel not to use the alert message boxes.
Regards,
Barrie
Thank you so much Barrie. This was perfect & macro now works great. I plan to do this with about 200 different files in several macros, for different purposes.
Appreciate your quick help!
Vicki