Deleting Worksheet - No Confirmations ?

  • Thread starter Thread starter lance-news
  • Start date Start date
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
 
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)
 
Application.DisplayAlerts = False
Application.ActiveWorkbook.Sheets(3).Delete
Application.DisplayAlerts = True
 
Application.DisplayAlerts = False
Application.ActiveWorkbook.Sheets(3).Delete
Application.DisplayAlerts = True

HTH
Paul
 
Hi Lance, this should do ya...

Application.DisplayAlerts = False
Application.DisplayAlerts = True

Above and below you code...

seeya ste
 
Back
Top