I am attempting to make it so rows hide/unhide based on the values in Cells C6, C12, and C14. I wrote the code for it and had it working, but for some reason after coming back to it a few days later it no longer works. The code is as follows:
I'm relatively new, so I don't know if there is an issue with the syntax. My biggest confusion is why the code worked earlier and no longer does. Any help is greatly appreciated!
Code:
Private Sub WorkSheet_Change(ByVal target As Range)
If ThisWorkbook.Worksheets("Part Selector").Range("C14") = "Yes" And ThisWorkbook.Worksheets("Part Selector").Range("C6") = "800A" And ThisWorkbook.Worksheets("Part Selector").Range("C12") = "Main Breaker Switchboard" Then
Me.rows("16:18").EntireRow.Hidden = False
Else
Me.rows("16:18").EntireRow.Hidden = True
End If
End Sub