B
bforster1
Is it possible to have code that protects cells based on an i
statement. I have the following code that unhides certain rows if th
user selects "Units" from the ComboBox. I would like other cells to b
protected if the user selects "Units" and then unprotect if no
"Units".
Private Sub ComboBox1_Change()
If Worksheets("Sheet1").Range("J18").Value = "Units" Then
Rows("25:28").Select
Selection.EntireRow.Hidden = True
Rows("25:28").Select
Selection.EntireRow.Hidden = False
End If
If Worksheets("Sheet1").Range("J18").Value = "Input" Then
Rows("25:28").Select
Selection.EntireRow.Hidden = True
Rows("25:25").Select
Selection.EntireRow.Hidden = False
Range("B13").Select
End If
Thanks
statement. I have the following code that unhides certain rows if th
user selects "Units" from the ComboBox. I would like other cells to b
protected if the user selects "Units" and then unprotect if no
"Units".
Private Sub ComboBox1_Change()
If Worksheets("Sheet1").Range("J18").Value = "Units" Then
Rows("25:28").Select
Selection.EntireRow.Hidden = True
Rows("25:28").Select
Selection.EntireRow.Hidden = False
End If
If Worksheets("Sheet1").Range("J18").Value = "Input" Then
Rows("25:28").Select
Selection.EntireRow.Hidden = True
Rows("25:25").Select
Selection.EntireRow.Hidden = False
Range("B13").Select
End If
Thanks