ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to suppress Excel default message (https://www.excelbanter.com/excel-programming/348551-how-suppress-excel-default-message.html)

Sandy

How to suppress Excel default message
 
Hello -

I have a button that deletes a sheet. Prior to the sheet being deleted,
Excel has a message box that pops up asking if you really want to delete it.
I need to suppress that message. Is there a way you can keep default
messages from displaying?

Any help will be greatly appreciated!
--
Sandy

Chip Pearson

How to suppress Excel default message
 
Sandy,

Try code like

Application.DisplayAlerts = False
' delete the sheet
Application.DisplayAlerts = True


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


"Sandy" wrote in message
...
Hello -

I have a button that deletes a sheet. Prior to the sheet being
deleted,
Excel has a message box that pops up asking if you really want
to delete it.
I need to suppress that message. Is there a way you can keep
default
messages from displaying?

Any help will be greatly appreciated!
--
Sandy




Sandy

How to suppress Excel default message
 
Thanks, Chip!
--
Sandy


"Chip Pearson" wrote:

Sandy,

Try code like

Application.DisplayAlerts = False
' delete the sheet
Application.DisplayAlerts = True


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


"Sandy" wrote in message
...
Hello -

I have a button that deletes a sheet. Prior to the sheet being
deleted,
Excel has a message box that pops up asking if you really want
to delete it.
I need to suppress that message. Is there a way you can keep
default
messages from displaying?

Any help will be greatly appreciated!
--
Sandy






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

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