ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How do I stop a message from appearing when deleting using VB? (https://www.excelbanter.com/excel-programming/435391-how-do-i-stop-message-appearing-when-deleting-using-vbulletin.html)

Silvertoe

How do I stop a message from appearing when deleting using VB?
 
I am using the delete method in VB to delete a sheet that is being copied in
redundancy. How in the world do I stop Excels default message from appearing
and use my own?

Don Guillett

How do I stop a message from appearing when deleting using VB?
 
look in the help index for DISPLAY ALERTS

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Silvertoe" wrote in message
...
I am using the delete method in VB to delete a sheet that is being copied
in
redundancy. How in the world do I stop Excels default message from
appearing
and use my own?



Mike H

How do I stop a message from appearing when deleting using VB?
 
Hi,

Application.DisplayAlerts = False
Worksheets("MySheet").Delete
Application.DisplayAlerts = True

Mike

"Silvertoe" wrote:

I am using the delete method in VB to delete a sheet that is being copied in
redundancy. How in the world do I stop Excels default message from appearing
and use my own?



All times are GMT +1. The time now is 09:46 AM.

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