Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 97
Default Macro to hide/unhide WS based upon WS tab color

I have this macro to hide all WS that have red tabs. But it dosn't work. It
only hides one tab when there are many that are red. What is wrong?

Sub Hide_shts()
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
If ws.Tab.Color = 255 Then
ws.Visible = False
End If
Next
End Sub

Thanks,

Joe M.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how can I unhide/hide a sheet based on pull down selection? Keith Excel Discussion (Misc queries) 1 August 12th 08 04:17 PM
Hide or unhide sheets based on cell billinr Excel Discussion (Misc queries) 2 July 13th 07 07:42 PM
Macro that will unhide then hide rows minka Excel Discussion (Misc queries) 10 October 21st 06 01:37 PM
Macro to hide and unhide based on criteria [email protected] Excel Discussion (Misc queries) 1 June 5th 06 08:05 PM
hide/unhide macro Matt Excel Discussion (Misc queries) 2 April 6th 06 07:24 PM


All times are GMT +1. The time now is 04:03 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"