Overwrite saved workbook in VB Script

M

Martin X.

Hello,

What is the proper method for saving a workbook and overwriting without user
intervention if it already exists? I tried recording a macro and looking at
the VBA code, but it doesn't show the code for overwriting a workbook. I
checked a few online sites but everything I've seen shows how to save a
workbook only, which I already how to do. Thanks.
 
M

Michael

Use this:

Application.DisplayAlerts = False
Thisworkbook.save
Application.DisplayAlerts = True ' Reseting for other workbooks

Mike Arch.

Please rate this posting if helpful
 
T

Tom Ogilvy

Thisworkbook.Save saves thisworkbook as itself (with its current name and
location) and requires no displayAlert setting.


Perhaps you meant SaveAs (with appropriate arguments).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top