Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Is there a way to delete all sheets but the active one?
Thanks Hans |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Application.Displayalerts = False For Each sh In Activeworkbook.Worksheets If sh.Name < activesheet.name then sh.Delete End If Next sh Application.Displayalerts = True -- HTH Bob Phillips (replace xxxx in the email address with gmail if mailing direct) "hans" wrote in message ... Is there a way to delete all sheets but the active one? Thanks Hans |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub DeleteAll()
Dim ws As Worksheet Application.DisplayAlerts = False For Each ws In Worksheets If Not ws Is ActiveSheet Then ws.Delete End If Next Application.DisplayAlerts = True End Sub Sandy hans wrote: Is there a way to delete all sheets but the active one? Thanks Hans |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Hans
"Sandy" schreef in bericht oups.com... Sub DeleteAll() Dim ws As Worksheet Application.DisplayAlerts = False For Each ws In Worksheets If Not ws Is ActiveSheet Then ws.Delete End If Next Application.DisplayAlerts = True End Sub Sandy hans wrote: Is there a way to delete all sheets but the active one? Thanks Hans |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro to delete sheets and saves remaining file does not properly delete module | Excel Programming | |||
Macro to delete sheets and saves remaining file does not properly delete module | Excel Programming | |||
Macro to delete sheets and saves remaining file does not properly delete module | Excel Programming | |||
Macro to delete sheets and saves remaining file does not properly delete module | Excel Programming | |||
Macro to delete sheets and saves remaining file does not properly delete module | Excel Programming |