ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Disable Worksheet Delete Dialog (https://www.excelbanter.com/excel-programming/324337-disable-worksheet-delete-dialog.html)

Greg

Disable Worksheet Delete Dialog
 
I have a VBA macro that needs to delete a worksheet but the confirmation
dialog comes up when run. Is there a way to disable this dialog.

Thanks,
Greg

Chip Pearson

Disable Worksheet Delete Dialog
 
Greg,

Try something like

Application.DisplayAlerts = False
' your code here
Application.DisplayAlerts = True


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com





"Greg" wrote in message
...
I have a VBA macro that needs to delete a worksheet but the
confirmation
dialog comes up when run. Is there a way to disable this
dialog.

Thanks,
Greg





All times are GMT +1. The time now is 06:50 AM.

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