LaneFowler
New Member
- Joined
- Jul 14, 2010
- Messages
- 30
I have a Workshet that contains a Checkbox from the Control Toolbar. When the Checkbox is checked, non-adjacent rows are un-hidden, and when the checkbox is unchecked, the non-adjacent rows are hidden.
The rows in question contain buttons that activate other macros. The Problem I have is that when the Checkbox is unchecked and the rows in question are hidden, the buttons continue to show. I need a macros to hide the buttons when the rows that sit under the buttons are also hdden, i.e., a button on top of row 3 should also be hidden when row 3 is hidden.
The buttons are clipart from the AutoShapes Toolbar.
My Macros is below. Each of the rows that are hidden/unhidden by the checkbox contain 2 additional buttons that should be hidden when the rows are hidden.
Private Sub CheckBox1_Click()
If Sheet1.CheckBox1 Then
End Sub
Help is appreciated!
The rows in question contain buttons that activate other macros. The Problem I have is that when the Checkbox is unchecked and the rows in question are hidden, the buttons continue to show. I need a macros to hide the buttons when the rows that sit under the buttons are also hdden, i.e., a button on top of row 3 should also be hidden when row 3 is hidden.
The buttons are clipart from the AutoShapes Toolbar.
My Macros is below. Each of the rows that are hidden/unhidden by the checkbox contain 2 additional buttons that should be hidden when the rows are hidden.
Private Sub CheckBox1_Click()
If Sheet1.CheckBox1 Then
Rows("3").Hidden = False
Rows("18").Hidden = False
Rows("169").Hidden = False
Rows("208").Hidden = False
Rows("216").Hidden = False
Rows("255").Hidden = False
ElseRows("18").Hidden = False
Rows("169").Hidden = False
Rows("208").Hidden = False
Rows("216").Hidden = False
Rows("255").Hidden = False
Rows("3").Hidden = True
Rows("18").Hidden = True
Rows("169").Hidden = True
Rows("208").Hidden = True
Rows("216").Hidden = True
Rows("255").Hidden = True
End IfRows("18").Hidden = True
Rows("169").Hidden = True
Rows("208").Hidden = True
Rows("216").Hidden = True
Rows("255").Hidden = True
End Sub
Help is appreciated!