Hi everyone,
I have various sheets in one workbook. Sheet 1 is the "summary sheet" where I have all my checkboxes. What I am after is, depending on what checkboxes are ticked, certain actions should happen. For each checkbox, I need 2 actions to occur simultaneously. I need a sheet unhidden and, on another sheet, certain rows unhidden (in both cases the default setting is hidden).
This leads me to ask 2 questions:
1) The code I have managed to piece together only works in part, insofar that I can get it to unhide the sheet I want but it isn't unhiding the rows I want on the second sheet. Can you help me as I can't see where I'm going wrong.
2) Will this code work if I select multiple checkboxes at the same time?
The checkbox is ActiveX
Thanks for your assistance
B
I have various sheets in one workbook. Sheet 1 is the "summary sheet" where I have all my checkboxes. What I am after is, depending on what checkboxes are ticked, certain actions should happen. For each checkbox, I need 2 actions to occur simultaneously. I need a sheet unhidden and, on another sheet, certain rows unhidden (in both cases the default setting is hidden).
This leads me to ask 2 questions:
1) The code I have managed to piece together only works in part, insofar that I can get it to unhide the sheet I want but it isn't unhiding the rows I want on the second sheet. Can you help me as I can't see where I'm going wrong.
2) Will this code work if I select multiple checkboxes at the same time?
The checkbox is ActiveX
Code:
Private Sub CheckBox1_Click()
On Error Resume Next
ThisWorkbook.Sheets("Sheet2").Visible = CheckBox1.Value
If CheckBox1 = True Then
ThisWorkbook.Sheets("Sheet3").Select
[5:10].EntireRow.Hidden = False
Else: [5:10].EntireRow.Hidden = True
End If
End Sub
Thanks for your assistance
B