Deleting Worksheet - No Confirmations ?

L

lance-news

How do I delete a worksheet without getting the confirmation message:
"Are you sure you wish to delete this worksheet?"

Application.ActiveWorkbook.Sheets(3).Delete


Lance
 
B

Bob Phillips

Lance

Precede the code with

Application.DisplayAlerts = False


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
P

Peo Sjoblom

Application.DisplayAlerts = False
Application.ActiveWorkbook.Sheets(3).Delete
Application.DisplayAlerts = True
 
P

pfsardella

Application.DisplayAlerts = False
Application.ActiveWorkbook.Sheets(3).Delete
Application.DisplayAlerts = True

HTH
Paul
 
S

ste mac

Hi Lance, this should do ya...

Application.DisplayAlerts = False
Application.DisplayAlerts = True

Above and below you code...

seeya ste
 

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