marcenet03
New Member
- Joined
- Apr 12, 2019
- Messages
- 22
0
I have the following code to delete multiple sheets. This code takes forever to delete the sheets, not sure how can I speed up the process. If someone can help me out, would be great.
I have the following code to delete multiple sheets. This code takes forever to delete the sheets, not sure how can I speed up the process. If someone can help me out, would be great.
VBA Code:
Sub DeleteSelectedSheets()
Dim h As Long, RESA1() As Variant
RESA1 = Array("Upload EC", "V-UploadEC", "EC Proj Data", "Orion SA Proj Data", _
"Orion SA Data Table", "Proj Data", "Tables our", "Qty", "Multi Sites", "Data table" _
, "Tbls", "Match", "Cov", "Quote", "Agg Quote", "RFQ", "Contractor", "HEER", "HEER_L", _
"Site Decl", "Post Decl", "$", "$Enl", "ESInfo", "NBB Training", "T&C", "Work Order", "Installer Contract", "Recycle", "Rent", "PM", _
"Xero", "Xero prep", "T&C Quote", "T&C VIC", "T&C noCert", "N-Nom", "CB PM Ledger", _
"N-A9s", "N-A10s", "V-A-Lamp-Ballast", "VEET LCP", "VEU_LCP_35", "V-B-Space", _
"V18 tbls", "V-C-BCA", "V-Compliance", "V-other", "ESS Other", "VIC pcode")
On Error Resume Next
Application.DisplayAlerts = False
For h = LBound(RESA1) To UBound(RESA1)
Worksheets(RESA1(h)).Delete
Next h
Application.DisplayAlerts = True
On Error GoTo 0