Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Delete hidden worksheets
Hi
What code can be used to delete all hidden worksheets? Thanks Sham |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Delete hidden worksheets
Hi
try Sub delete_hidden() Dim wkSht As Worksheet For Each wkSht In ActiveWorkbook.Worksheets If wkSht.Visible < True Then wkSht.Delete End If Next wkSht End Sub this will delete all sheets that are not visible (xlSheetHidden and xlSheetVeryHidden) -- Regards Frank Kabel Frankfurt, Germany Shamsul Islam wrote: Hi What code can be used to delete all hidden worksheets? Thanks Sham |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Delete hidden worksheets
Sub DeleteHidden()
Dim sh As Worksheet Application.DisplayAlerts = False For Each sh In ActiveWorkbook.Worksheets If sh.Visible = xlHidden Or sh.Visible = xlVeryHidden Then sh.Delete End If Next sh Application.DisplayAlerts = True End Sub -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Shamsul Islam" wrote in message ... Hi What code can be used to delete all hidden worksheets? Thanks Sham |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Delete Hidden Named Range | Excel Discussion (Misc queries) | |||
How do I delete hidden records/rows? | Excel Discussion (Misc queries) | |||
Delete hidden cells | Excel Discussion (Misc queries) | |||
How do I detect hidden worksheets or hidden data on a worksheet? | Excel Discussion (Misc queries) | |||
How do I delete hidden character in Excel? | Excel Discussion (Misc queries) |