Archive of Mr Excel Message Board


Back to Excel VBA archive index
Back to archive home

skip dialog boxes when using save as in a macro

Posted by Christopher on January 15, 2002 7:15 AM
hello all. i just answered a few questions so i hope someone will answer this. how do you turn off the dialog boxes when you use save as in a macro. rather than asking me if i want to replace the current file i just want to do it.

any hints,

thanks christopher


Check out our Excel VBA Resources

Re: skip dialog boxes when using save as in a macro

Posted by Doug on January 15, 2002 7:37 AM
Try using something like this:

Application.DisplayAlerts=False
WB.SaveAs Filename:=Myfile.xls
Application.DisplayAlerts=True.


Hope that helps.


Re: skip dialog boxes when using save as in a macro

Posted by christopher on January 15, 2002 8:02 AM
thanks. works like a dream


This archive is from the original message board at www.MrExcel.com.
All contents © 1998-2004 MrExcel.com.
Visit our online store to buy searchable CD's with thousands of VBA and Excel answers.
Microsoft Excel is a registered trademark of the Microsoft Corporation.
MrExcel is a registered trademark of Tickling Keys, Inc.