tlc53
Active Member
- Joined
- Jul 26, 2018
- Messages
- 399
Hi,
I have the below code which works fine if the target "No._Partners" is on the same sheet. However, in this case, "No._Partners" is based on another sheet. Can someone please help me change the first part of the code to refer to another sheet? I'm not quite sure how to do that..
Thanks!
I have the below code which works fine if the target "No._Partners" is on the same sheet. However, in this case, "No._Partners" is based on another sheet. Can someone please help me change the first part of the code to refer to another sheet? I'm not quite sure how to do that..
Thanks!
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("No._Partners")) Is Nothing Then
If Target.Cells.CountLarge > 1 Then Exit Sub
Select Case Target.Value
Case "Please Select"
Range("159:167").EntireRow.Hidden = True
Case 2
Range("159:167").EntireRow.Hidden = False
Range("160:167").EntireRow.Hidden = True
Case 3
Range("159:167").EntireRow.Hidden = False
Range("161:167").EntireRow.Hidden = True
Case 4
Range("159:167").EntireRow.Hidden = False
Range("162:167").EntireRow.Hidden = True
Case 5
Range("159:167").EntireRow.Hidden = False
Range("163:167").EntireRow.Hidden = True
Case 6
Range("159:167").EntireRow.Hidden = False
Range("164:167").EntireRow.Hidden = True
Case 7
Range("159:167").EntireRow.Hidden = False
Range("165:167").EntireRow.Hidden = True
Case 8
Range("159:167").EntireRow.Hidden = False
Range("166:167").EntireRow.Hidden = True
Case 9
Range("159:167").EntireRow.Hidden = False
Range("167:167").EntireRow.Hidden = True
Case 10
Range("159:167").EntireRow.Hidden = False
End Select
End If
End Sub