Overridding the "already exists" message with the SaveAs method

C

Conan Kelly

Hello all,

I'm using Excel 2002 SP3.

I have a list of 66 password protected Excel spread sheets that I need
to open, delete the top two lines, then save it removing the password,
and then move the file to a different folder.

I have the open (including password) and the deleting the top two rows
working.

The way I'm trying to remove the password is by saving as the same
workbook leaving the password argument blank. The problem is that I
get the message saying that it already exists and asking me if I want
to overwrite it. Is there any way to get the SaveAs method to
override this message box and overwrite the file by default? I looked
through the help files on SaveAs method and none of the arguments
explicitly said anything about existing files. The only one that I
think might work is the ConflictResolution argument, but that looks
like it is for resolving conflicts when 2 people are working on the
same workbook at the same time.

Any help on this will be greatly appreciated,

Conan Kelly
 
B

Bob Phillips

Precede the code with

Application.DisplayAlerts = False

and reset to True afterwards

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)
 
A

Amber_D_Laws

Hi There,

Just a curiousity, but what other Alerts will this suppress other than
"This file already exsits."?

Regards,
Amber D. Laws :)
 
B

Bob Phillips

Most messages that popup with a default action.

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"Amber_D_Laws" <[email protected]>
wrote in message
 

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