VBA Help using value in sheet 1 to hide unhide row in sheet 2
I have created the following VBA code that works well to hide and unhide rows in a given sheet. I use this basic code in a number of sheets where the "University-wide" and "College by College" Cases are used and selected from a drop box. My challenge is I want to be able to set the value of "L8" in sheet 1 and use it in all of the other sheets where this code appears instead of having to select the value in each sheet where the code is used.
How do I do this?
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
ActiveSheet.Activate
If Not Application.Intersect(Range("L8"), Range(Target.Address)) Is Nothing Then
Select Case Target.Value
Case Is = "University-wide": Range("48:216").EntireRow.Hidden = True
Range("10:47,217:218").EntireRow.Hidden = False
Case Is = "College by College": Range("10:30,47:220").EntireRow.Hidden = False
Range("31:46").EntireRow.Hidden = True
End Select
End If
End Sub