ExcelNovice17
New Member
- Joined
- Apr 11, 2019
- Messages
- 7
Hi,
I want my excel to hide and unhide a row when i select an option from my drop-down list but it is not working. My excel sheet needs to be protected and certain areas need to be locked including part of the row. Here is the code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Range("I19") = "MALE" Then
Rows("35:36").Hidden = False
Else: Rows("35:36").Hidden = True
End If
End Sub
I want my excel to hide and unhide a row when i select an option from my drop-down list but it is not working. My excel sheet needs to be protected and certain areas need to be locked including part of the row. Here is the code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Range("I19") = "MALE" Then
Rows("35:36").Hidden = False
Else: Rows("35:36").Hidden = True
End If
End Sub