Disable Worksheet Delete Warning

C

Charles in Iraq

Greetings:

When my VBA macro deletes one of the worksheets in
my workbook (through the Sheet.Delete method), I get
the following warning:

"Data may exist in the sheet(s) selected for deletion.
To permanently delete the data, press Delete."

I then have to click on the Delete button to proceed with
the action.

Is there any way to suppress this annoying warning so
that the worksheet will automatically get deleted?

Respectfully,

Charles
 
B

Bob Phillips

precede it with

Application.DisplayAlerts = False

and reset to True after.

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 

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