Using Array to refer to multiple sheets

The following example code deletes multiple sheets in one go.
Sub DeleteMultipleSheets() Application.DisplayAlerts = False With ThisWorkbook.Worksheets(Array("Sheet2", "Sheet3")) .Delete End With Application.DisplayAlerts = True End Sub
»
- Vishesh's blog
- Login or register to post comments
- 8624 reads

Recent comments
7 years 33 weeks ago
8 years 19 weeks ago
8 years 31 weeks ago
8 years 34 weeks ago
8 years 35 weeks ago
8 years 40 weeks ago
8 years 48 weeks ago
8 years 49 weeks ago
8 years 49 weeks ago
8 years 49 weeks ago