ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   deleting worksheet (https://www.excelbanter.com/excel-programming/297386-deleting-worksheet.html)

Fun Kid

deleting worksheet
 
What line of code should I include while deleting a worksheet through
VBA so that the security feature (The selected sheet(s) will be
permanently deleted.) is disabled. Right now I have to click "OK" for
the code to continue. Any suggestions?


Frank Kabel

deleting worksheet
 
Hi
use something like
...
application.displayalerts=false
'delete the sheet
application.displayalerts=True

--
Regards
Frank Kabel
Frankfurt, Germany


Fun Kid wrote:
What line of code should I include while deleting a worksheet through
VBA so that the security feature (The selected sheet(s) will be
permanently deleted.) is disabled. Right now I have to click "OK"

for
the code to continue. Any suggestions?



Fun Kid

deleting worksheet
 
Hi Frank,

Thank you for your prompt reply. It worked.

Fun Kid

"Frank Kabel" wrote in message
...
Hi
use something like
..
application.displayalerts=false
'delete the sheet
application.displayalerts=True

--
Regards
Frank Kabel
Frankfurt, Germany


Fun Kid wrote:
What line of code should I include while deleting a worksheet

through
VBA so that the security feature (The selected sheet(s) will be
permanently deleted.) is disabled. Right now I have to click "OK"

for
the code to continue. Any suggestions?





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

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