Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Thanks. Worked a treat Cheers Corey.... "JMB" wrote in message ... This seems to work for me. Backup before trying. Sub DeleteSheets() Dim i As Long On Error Resume Next Application.DisplayAlerts = False For i = 3 To Worksheets.Count Worksheets(CStr(i)).Delete Next i Application.DisplayAlerts = True End Sub "Corey" wrote: Application.DisplayAlerts = False Worksheets("3").Delete Application.DisplayAlerts = False Worksheets("4").Delete Application.DisplayAlerts = False Worksheets("5").Delete Is there a way to adapt the above code to simply delete ALL sheets than 2 Tried WorkSheets.Delete"2" but get an error Corey.... |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Deleting worksheets | Excel Discussion (Misc queries) | |||
Deleting Worksheets in VBA | Excel Programming | |||
Help deleting worksheets | Excel Discussion (Misc queries) | |||
Deleting worksheets | Excel Programming | |||
Deleting worksheets | Excel Programming |