ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Deleting Worksheet - No Confirmations ? (https://www.excelbanter.com/excel-programming/281963-deleting-worksheet-no-confirmations.html)

[email protected]

Deleting Worksheet - No Confirmations ?
 
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


Bob Phillips[_5_]

Deleting Worksheet - No Confirmations ?
 
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)

wrote in message
...
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




Peo Sjoblom

Deleting Worksheet - No Confirmations ?
 
Application.DisplayAlerts = False
Application.ActiveWorkbook.Sheets(3).Delete
Application.DisplayAlerts = True

--

Regards,

Peo Sjoblom

wrote in message
...
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




[email protected]

Deleting Worksheet - No Confirmations ?
 
Application.DisplayAlerts = False
Application.ActiveWorkbook.Sheets(3).Delete
Application.DisplayAlerts = True

HTH
Paul
--------------------------------------------------------------------------------------------------------------
Be advised to back up your WorkBook before attempting to make changes.
--------------------------------------------------------------------------------------------------------------

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



ste mac

Deleting Worksheet - No Confirmations ?
 
Hi Lance, this should do ya...

Application.DisplayAlerts = False
Application.DisplayAlerts = True

Above and below you code...

seeya ste


All times are GMT +1. The time now is 03:00 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com