ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Deleting worksheets (https://www.excelbanter.com/excel-programming/304806-deleting-worksheets.html)

OSCAR

Deleting worksheets
 
I have a for each loop which moves through each worksheet
and deletes those that fail a test.

However, each time it deletes I get a message saying that
the worksheet is to be deleted and an OK and a Cancel
button.

What do i have to add to my code to not get this message?

Frank Kabel

Deleting worksheets
 
Hi

application.displayalerts=false
'deletion code
application.displayalerts=true

--
Regards
Frank Kabel
Frankfurt, Germany

"Oscar" schrieb im Newsbeitrag
...
I have a for each loop which moves through each worksheet
and deletes those that fail a test.

However, each time it deletes I get a message saying that
the worksheet is to be deleted and an OK and a Cancel
button.

What do i have to add to my code to not get this message?




All times are GMT +1. The time now is 11:59 AM.

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