Reputation: 145
I wrote vba code to delete a sheet permanently. When i run it, comes up with the following message:
"Data may exist in the sheet(s) selected for deletion. To permanently delete the data, press Delete."
How can i write this code so that it deletes the worksheet automatically without the message popping up?
ThisWorkbook.Sheets("SVT").Delete
Upvotes: 2
Views: 7522
Reputation: 328785
You can use:
Application.DisplayAlerts = False
ThisWorkbook.Sheets("SVT").Delete
Application.DisplayAlerts = True
Upvotes: 5