supercharger
New Member
- Joined
- Aug 14, 2017
- Messages
- 13
I'm novice by all definitions with VBA, but I can usually piece things together that I need to do. this one is stumping me.
I have a cell, C62, that I have a data validation list with five options. Two options out of that, I want it to make additional rows, 65-68, visible.
The code works perfectly; if I clear any cell in the entire worksheet, I get a Run Time Error 13 dialog.
Any help is greatly appreciated!
I have a cell, C62, that I have a data validation list with five options. Two options out of that, I want it to make additional rows, 65-68, visible.
The code works perfectly; if I clear any cell in the entire worksheet, I get a Run Time Error 13 dialog.
Any help is greatly appreciated!
Code:
Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
If Target.Address = ("$C$62") And Target.Value2 = "Minimal with External/Contract Change Resource - Advisory and material review" Then
Sheets("Change Needs Assessment").Rows("65:68").EntireRow.Hidden = False
ElseIf Target.Address = ("$C$62") And Target.Value2 = "Moderate + - External/Contract Change Lead requested for change strategy and deliverable " Then
Sheets("Change Needs Assessment").Rows("65:68").EntireRow.Hidden = False
ElseIf Target.Address = ("$C$62") And Target.Value2 = "" Then
Sheets("Change Needs Assessment").Rows("65:68").EntireRow.Hidden = True
ElseIf Target.Address = ("$C$62") And Target.Value2 = "Minimal with Internal Strategic Change Resource- Advisory and material review" Then
Sheets("Change Needs Assessment").Rows("65:68").EntireRow.Hidden = True
ElseIf Target.Address = ("$C$62") And Target.Value2 = "Moderate + - Internal Change Lead requested for change strategy and deliverable " Then
Sheets("Change Needs Assessment").Rows("65:68").EntireRow.Hidden = True
ElseIf Target.Address = ("$C$62") And Target.Value2 = "None - The project does not believe Change Management is required" Then
Sheets("Change Needs Assessment").Rows("65:68").EntireRow.Hidden = True
End If
End Sub