ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Deleting Sheet without message box (https://www.excelbanter.com/excel-programming/287523-deleting-sheet-without-message-box.html)

Mr. T[_2_]

Deleting Sheet without message box
 
Hello,

I want to delete a worksheet, but upon doing so a message box pops up
informing the user that the sheet will be deleted, giving OK and Cancel
options. How do I suppress this message box? I have screened the application
object for a switch but have not figured out what to do.

Thank you so much for your help!!

Oliver



Dave Peterson[_3_]

Deleting Sheet without message box
 
application.displayalerts = false
worksheets("sheet99").delete
application.displayalerts = true

"Mr. T" wrote:

Hello,

I want to delete a worksheet, but upon doing so a message box pops up
informing the user that the sheet will be deleted, giving OK and Cancel
options. How do I suppress this message box? I have screened the application
object for a switch but have not figured out what to do.

Thank you so much for your help!!

Oliver


--

Dave Peterson


Mike Fogleman

Deleting Sheet without message box
 
Application.DisplayAlerts = False
Sheets("Whatever").Delete
Application.DisplayAlerts = True

"Mr. T" wrote in message
s.com...
Hello,

I want to delete a worksheet, but upon doing so a message box pops up
informing the user that the sheet will be deleted, giving OK and Cancel
options. How do I suppress this message box? I have screened the

application
object for a switch but have not figured out what to do.

Thank you so much for your help!!

Oliver






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

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