Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
How would I delete all Worksheets in a Workbook except those called "HOME",
"ONE" and "TWO" (for example). Thanks! Dave |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Sub DeleteSheets()
Dim sht As Worksheet Application.ScreenUpdating = False For Each sht In Worksheets If sht.Name < "HOME" Then If sht.Name < "ONE" Then If sht.Name < "TWO" Then Application.DisplayAlerts = False sht.Delete Application.DisplayAlerts = True End If End If End If Next sht Application.ScreenUpdating = True End Sub --- HTH, JP On Oct 30, 7:45 pm, Dave wrote: How would I delete all Worksheets in a Workbook except those called "HOME", "ONE" and "TWO" (for example). Thanks! Dave |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
I can't delete my worksheets | Excel Discussion (Misc queries) | |||
Add or Delete Rows in Protected worksheets | Excel Discussion (Misc queries) | |||
How can I delete a row from all worksheets in a workbook easily? | Excel Worksheet Functions | |||
not delete worksheets from names in a range | Excel Discussion (Misc queries) | |||
delete rows from multiple worksheets | Excel Worksheet Functions |