onthegreen03
Board Regular
- Joined
- Jun 30, 2016
- Messages
- 170
- Office Version
- 365
- Platform
- Windows
Hi - I pieced together code that hides/unhides, using a checkbox, a set of columns on another sheet. Can someone tell me how I can modify this to also include an entire row on the same sheet? So in the example below hide/unhide columns C:N and row 29. Thank you for your help!
Private Sub CheckBox1_Click()
Dim xAddress As String
xAddress = "C:N"
If CheckBox1.Value Then
Application.Sheets("RHA CGF Model").Columns(xAddress).Hidden = True
CheckBox1.Caption = "Include"
Else
Application.ActiveSheet.Columns(xAddress).Hidden = False
CheckBox1.Caption = "Exclude"
End If
End Sub
Private Sub CheckBox1_Click()
Dim xAddress As String
xAddress = "C:N"
If CheckBox1.Value Then
Application.Sheets("RHA CGF Model").Columns(xAddress).Hidden = True
CheckBox1.Caption = "Include"
Else
Application.ActiveSheet.Columns(xAddress).Hidden = False
CheckBox1.Caption = "Exclude"
End If
End Sub