View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Otto Moehrbach Otto Moehrbach is offline
external usenet poster
 
Posts: 1,090
Default Hide/unhide TAB Script

What you want can be done but your explanation of what you want is a bit
confusing. You say you want tabs A:F hidden when you select tab E. That
means that tab E, the sheet you selected, would be hidden. The obvious
question is what sheet do you want active after you have hidden the active
sheet? A similar question for tab F.
Post back and present what you want in a more logical and detailed form.
Something like:
Activate tab A: This happens, that happens.
Deactivate tab A: This happens, that happens.
And so forth for every sheet in the file. HTH Otto
wrote in message
oups.com...
Initially I wanted to group TABs together i.e. if i clicked on a TAB
five TABs pertaining to that TAB woud show up and the others would not
be seen, but i learned through this:
http://groups.google.com/group/micro...740ea26a7a5570

thread that i couldn't but one of the members named otto Moehrbach
posted this script to unhide TABs

Private Sub Worksheet_Activate()
Dim ws As Worksheet
For Each ws In Sheets(Array("One", "Two", "Three"))
ws.Visible = True
Next ws
End Sub

Now this is great but I need a little more. What I would like to do
is, well ill explain through example. Lets say I want an Excel
document with 6 TABs (A, B, C, D, E, F) but really there are 30
TABs. When I open the Excel document I would like it to open in TAB
"A" all the time and with tabs 1-12 and 1a-12a Hidden. Now 1-12 and
1a-12a should be or stay hidden when A, B, C, or D is active. Now
when I activate "E" I would like TABs 1-12 to show and TABs A - F to
hide, and the same would go for TAB "F" it would hide A - F and show
only 1a-12a. Now I'm guessing I would need some sort of "BACK" TAB
to show up in "E" and "F" so that I can get back to showing A-F and
hiding 1-12 and 1a-12a.

I hope that made sense, if you need more clarification please just
ask, I am using Excel 2002, in windows XP, thanks for any halp you can
provide.