acruthi
12-03-2010, 10:00 AM
I need to hide 120 worksheets in excel at all times and only show 2 of the 120 tabs when a particular selection is made.
I have the below code but just after 22 worksheets data I've reached the max code limit. Is there a better way to do it??? :dunno
Select Case Worksheets("Input").Range("C3").Value
Case "Argentina"
Worksheets("Argentina Market Profile").Visible = True
Worksheets("Argentina Market Profile Detail").Visible = True
Worksheets("Australia Market Profile").Visible = False
Worksheets("Australia Market Profile Detail").Visible = False
Worksheets("China Market Profile").Visible = False
Worksheets("China Market Profile Detail").Visible = False
Case "Australia"
Worksheets("Argentina Market Profile").Visible = False
Worksheets("Argentina Market Profile Detail").Visible = False
Worksheets("Australia Market Profile").Visible = True
Worksheets("Australia Market Profile Detail").Visible = True
Worksheets("China Market Profile").Visible = False
Worksheets("China Market Profile Detail").Visible = False
End Select
End Sub
I have the below code but just after 22 worksheets data I've reached the max code limit. Is there a better way to do it??? :dunno
Select Case Worksheets("Input").Range("C3").Value
Case "Argentina"
Worksheets("Argentina Market Profile").Visible = True
Worksheets("Argentina Market Profile Detail").Visible = True
Worksheets("Australia Market Profile").Visible = False
Worksheets("Australia Market Profile Detail").Visible = False
Worksheets("China Market Profile").Visible = False
Worksheets("China Market Profile Detail").Visible = False
Case "Australia"
Worksheets("Argentina Market Profile").Visible = False
Worksheets("Argentina Market Profile Detail").Visible = False
Worksheets("Australia Market Profile").Visible = True
Worksheets("Australia Market Profile Detail").Visible = True
Worksheets("China Market Profile").Visible = False
Worksheets("China Market Profile Detail").Visible = False
End Select
End Sub