OversizedCranium
New Member
- Joined
- Aug 18, 2015
- Messages
- 26
- Office Version
- 365
- Platform
- Windows
Hello,
I am very new to VBA so this is probably a quick fix, but I can't seem to get a second command to work underneath the first....
Is anyone able to help?
The first IF works perfectly, however I'm struggling to add another below it.
Thanks
I am very new to VBA so this is probably a quick fix, but I can't seem to get a second command to work underneath the first....
Is anyone able to help?
The first IF works perfectly, however I'm struggling to add another below it.
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
ActiveSheet.Activate
If Not Application.Intersect(Range("C18"), Range(Target.Address)) Is Nothing Then
Select Case Target.Value
Case Is = "Residential": Rows("33:45").EntireRow.Hidden = True
Rows("19:32").EntireRow.Hidden = False
Case Is = "Education": Rows("19:32").EntireRow.Hidden = True
Rows("33:37").EntireRow.Hidden = False
Rows("38:45").EntireRow.Hidden = True
Case Is = "Res & Ed": Rows("19:37").EntireRow.Hidden = False
Rows("38:45").EntireRow.Hidden = True
Case Is = "Part-Time": Rows("19:37").EntireRow.Hidden = True
Rows("38:45").EntireRow.Hidden = False
Case Is = "None Required": Rows("19:45").EntireRow.Hidden = True
End Select
End If
End Sub
Private Sub Worksheet_Change_Bel(ByVal Target As Range)
ActiveSheet.Activate
If Not Application.Intersect(Range("C52"), Range(Target.Address)) Is Nothing Then
Select Case Target.Value
Case Is = "No": Rows("53:55").EntireRow.Hidden = True
Case Is = "Yes": Rows("53:55").EntireRow.Hidden = False
End Select
End If
End Sub
Thanks