macone1976
asked on
Hide cells
I have a checkbox on an excel sheet. when checked, I need to hide cells A34:H54, when unchecked make the cells visible.
What sort of Checkbox are you using? Forms or ActiveX?
ASKER
Forms
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks, it works...
The follow code can be an alternative solution...
Private Sub CheckBox1_Click()
If CheckBox1.Value Then
Hide
Else
UnHide
End If
End Sub
Sub Hide()
With Range("A34:H54").Font
.ThemeColor = xlThemeColorDark1
.TintAndShade = 0
End With
End Sub
Sub UnHide()
With Range("A34:H54").Font
.ColorIndex = xlAutomatic
.TintAndShade = 0
End With
End Sub