Hi there, I am finding so difficult to start a new thread. My question is similar to the above. I have the following code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Range("a15").Value = "Exempt" And Range("F6").Value = "Exempt" Then
Rows("19").EntireRow.Hidden = True
Rows("21").EntireRow.Hidden = True
ElseIf Range("a15").Value = "Exempt" And Range("F6").Value = "Non-exempt" Then
Rows("19").EntireRow.Hidden = False
Rows("21").EntireRow.Hidden = False
ElseIf Range("a15").Value = "Non-exempt" And Range("F6").Value = "Exempt" Then
Rows("19").EntireRow.Hidden = False
Rows("21").EntireRow.Hidden = False
End If
End Sub
I need to create a second change action, but I get ambiguous name detected vba error, where do I change my code name? Thank you!
Split from: https://www.mrexcel.com/forum/excel-questions/1068094-hiding-rows-vba-question.html
Private Sub Worksheet_Change(ByVal Target As Range)
If Range("a15").Value = "Exempt" And Range("F6").Value = "Exempt" Then
Rows("19").EntireRow.Hidden = True
Rows("21").EntireRow.Hidden = True
ElseIf Range("a15").Value = "Exempt" And Range("F6").Value = "Non-exempt" Then
Rows("19").EntireRow.Hidden = False
Rows("21").EntireRow.Hidden = False
ElseIf Range("a15").Value = "Non-exempt" And Range("F6").Value = "Exempt" Then
Rows("19").EntireRow.Hidden = False
Rows("21").EntireRow.Hidden = False
End If
End Sub
I need to create a second change action, but I get ambiguous name detected vba error, where do I change my code name? Thank you!
Split from: https://www.mrexcel.com/forum/excel-questions/1068094-hiding-rows-vba-question.html
Last edited by a moderator: