Unwanted pop-up warning

G

Gene Augustin

In my macro:

I delete a sheet. I get a message "The selected sheets will be permanently
deleted."

I save a sheet and get the message "A file with "same name" already exists
at this location, do you want to replace it?"

How do I prevent these pop-up windows.
 
L

Laroche J

Gene Augustin wrote on 2009-03-14 09:49:
In my macro:

I delete a sheet. I get a message "The selected sheets will be permanently
deleted."

I save a sheet and get the message "A file with "same name" already exists
at this location, do you want to replace it?"

How do I prevent these pop-up windows.


Search for DisplayAlerts in the editor's help.

JL
Mac OS X 10.4.11, Office v.X 10.1.9
 
S

Shane Devenshire

Hi,

Application.DisplayAlerts = False

Application.DisplayAlerts = True

Advise - bracket the command which produces the alert, because if there is
some other unexpected alert you may need to know about that. Alerts come
back on automatically after a macro has run. Finally, there are some alerts
that will still display.
 

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