Archive of Mr Excel Message Board


Back to Excel VBA archive index
Back to archive home

Using SaveAs to overwrite existing files

Posted by Keith Willis on November 21, 2001 1:07 AM
Is there any way in VBA to do this without getting the warning dialog that i`m about to overwrite an existing file?

Check out our Excel VBA Resources

Re: Using SaveAs to overwrite existing files

Posted by Tom Morales on November 21, 2001 10:36 AM
Keith:
Insert the line:

Application.displayalerts = False

before you save the file. After saving it, add the line:

Application.displayalerts = True

Tom


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.