Hi
I have the following code on Sheet3 of my workbook. Unfortunately, when C16 is either left blank, or "standard" is inserted, nothing happens - i.e. it does not hide rows or columns.
I have the following code on Sheet3 of my workbook. Unfortunately, when C16 is either left blank, or "standard" is inserted, nothing happens - i.e. it does not hide rows or columns.
Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Application.EnableEvents = True
ActiveSheet.Unprotect
If Range("C16").Value = "" Then
Columns("O:P").EntireColumn.Hidden = True
Rows("18").EntireRow.Hidden = False
Rows("19:20").EntireRow.Hidden = True
ActiveSheet.Unprotect
If Range("C16").Value = "Standard" Then
Columns("O:P").EntireColumn.Hidden = True
Rows("18").EntireRow.Hidden = False
Rows("19:20").EntireRow.Hidden = True
End Sub