|  

» Delete sheets without confirmation prompts using VBA in Microsoft Excel

VBA macro tip contributed by Erlandsen Data Consulting offering Microsoft Excel Application development, template customization, support and training solutions
If you want to delete sheets from a workbook without the user being prompted for any
confirmations you can use this macro:
Sub DeleteSheet(strSheetName As String)
' deletes a sheet named strSheetName in the active workbook
    Application.DisplayAlerts = False
    Sheets(strSheetName).Delete
    Application.DisplayAlerts = True
End Sub



Rate This Tip
12 34 5
Rating: 4.67     Views: 94353
This worked great
Eddie
Thank you so much for the tip. This worked.

Eddie.
Click here to post comment
For Registered Users
Name
Comment Title
Comments