Delete Worksheet from List Macro
Closed
marklee800
Posts
1
Registration date
Saturday November 23, 2013
Status
Member
Last seen
November 23, 2013
-
Nov 23, 2013 at 12:09 PM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen January 16, 2023 - Nov 26, 2013 at 11:50 AM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen January 16, 2023 - Nov 26, 2013 at 11:50 AM
Related:
- Delete Worksheet from List Macro
- Transfer data from one excel worksheet to another automatically - Guide
- My contacts list names - Guide
- Automatically run a macro when opening a worksheet - Guide
- Network cmd commands list pdf - Guide
- How to change your best friends list on snapchat to 3 - Guide
1 response
TrowaD
Posts
2921
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
January 16, 2023
549
Nov 26, 2013 at 11:50 AM
Nov 26, 2013 at 11:50 AM
Hi Mark,
I added a line which checks if the cell is empty or not.
Here you go:
Trowa
I added a line which checks if the cell is empty or not.
Here you go:
Sub DeleteSheets()Best regards,
Dim i As Integer
For i = 2 To 30
Sheets("SheetList").Select
If Cells(i, 2).Value = vbNullString Then GoTo Next_i
Application.DisplayAlerts = False
Worksheets(Cells(i, 2).Value).Delete
Application.DisplayAlerts = True
Next_i:
Next i
End Sub
Trowa