ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   to delete a worksheet (https://www.excelbanter.com/excel-programming/324149-delete-worksheet.html)

阿三[_2_]

to delete a worksheet
 
but want to ignore the warning message, please advise what should I
add at the end of the following command? thanks

e.g.
Sheets("ABC").Select
Sheets("ABC").Delete

Paul



Ajtb

to delete a worksheet
 
Hi Paul

This will work, there is no need to select the sheet first.

Sub tt()
Application.DisplayAlerts = False
Sheets("ABC").Delete
Application.DisplayAlerts = True
End Sub

Regards
Andrew Bourke


阿三 wrote:
but want to ignore the warning message, please advise what should I
add at the end of the following command? thanks

e.g.
Sheets("ABC").Select
Sheets("ABC").Delete

Paul



阿三[_2_]

to delete a worksheet
 
Dear Andrew

Lots of thanks!

Paul

"Ajtb" 撰寫於郵件新聞
...
Hi Paul

This will work, there is no need to select the sheet first.

Sub tt()
Application.DisplayAlerts = False
Sheets("ABC").Delete
Application.DisplayAlerts = True
End Sub

Regards
Andrew Bourke


阿三 wrote:
but want to ignore the warning message, please advise what should

I
add at the end of the following command? thanks

e.g.
Sheets("ABC").Select
Sheets("ABC").Delete

Paul





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

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