Try another Select Case block, similar to the first one. Note that you can
write something like
Case "ABC", "JKL", "Sheet2", "Sheet1"
On Thu, 4 Nov 2004 19:42:11 -0500, "CLR" <(E-Mail Removed)> wrote:
>Thanks a zillion Tom,..........as usual, your code works absolutely
>perfect!!!
>
>One additonal thing, if you please..............how could it be modified to
>allow the 12 support sheets (now called C to H, and I to N) to have unique
>text names instead of being "six letters in a row"?
>
>Thanks again,
>Vaya con Dios,
>Chuck, CABGx3
>
>
>
>
>"Tom Ogilvy" <(E-Mail Removed)> wrote in message
>news:#(E-Mail Removed)...
>> this would be a start
>>
>> Put this in the ThisWorkbook Module.
>>
>> Private Sub Workbook_SheetActivate(ByVal Sh As Object)
>> Dim b1 As Long, b2 As Long
>> Dim sht As Worksheet, sChr As String
>> Select Case LCase(Sh.Name)
>> Case "original"
>> b1 = xlSheetVisible
>> b2 = xlSheetHidden
>> Case "future"
>> b1 = xlSheetHidden
>> b2 = xlSheetVisible
>> Case Else
>> Exit Sub
>> End Select
>> For Each sht In Worksheets
>> sChr = UCase(sht.Name)
>> If Len(sChr) = 1 Then
>> If sChr >= "C" And sChr <= "H" Then
>> sht.Visible = b1
>> ElseIf sChr >= "I" And sChr <= "N" Then
>> sht.Visible = b2
>> End If
>> End If
>> Next
>> End Sub
>>
>> --
>> Regards,
>> Tom Ogilvy
>>
>> "CLR" <(E-Mail Removed)> wrote in message
>> news:4CBC446A-9826-4F29-8243-(E-Mail Removed)...
>> > Hi All.....
>> >
>> > I create various maps, or diagrams in Excel. There are two major types,
>> > "ORIGINAL", and "FUTURE". Each type has several support sheets to go
>> with
>> > it. I was wondering if it would be possible to create a macro that
>would
>> > automatically expose to view, only those sheets (sheets C-H)associated
>> with
>> > the ORIGINAL sheet when I click on that one, and then hide those and
>> expose
>> > only those (sheets I-N) associated with the FUTURE sheet when I click on
>> that
>> > one, and back and forth.
>> >
>> > TIA for any ideas.....
>> >
>> > Vaya con DIos,
>> > Chuck, CABGx3
>> >
>> >
>>
>>
>
|