Tying checkboxes to cells


Posted by Rick Buchanan on September 14, 2000 6:48 PM

My problem is this:

I have a row that I only need visible a couple of months out of the year. When visible, each cell in the row has a checkbox in it.

When I try to "Hide" the row, the row disappears but the checkboxes don't. It is very frustrating. I would like the checkboxes to "Hide" with the row. Currently I am having to delete and recreate the rows (and the checkboxes) everytime I need them.

Let me know what you think,

Rick

Posted by Rick on September 15, 0100 10:09 AM

Re: "Tying" checkboxes to cells


Yes... I would very much like the code. I am some-what familiar with VBA but I haven't figured out how to do this.

Posted by Ivan Moala on September 15, 0100 12:44 PM

Re: "Tying" checkboxes to cells


Assuming the checkbox is an ActiveX control
available from the Control toolbox and
The row is 4 then;

Sub Hide()
Rows(4).EntireRow.Hidden = True
ActiveSheet.Shapes("CheckBox1").Visible = False
End Sub

Sub UnHide()
Rows(4).EntireRow.Hidden = False
ActiveSheet.Shapes("CheckBox1").Visible = True
End Sub


HTH

Ivan



Posted by Ivan Moala on September 14, 0100 9:31 PM

Re: "Tying" checkboxes to cells

I have a row that I only need visible a couple of months out of the year. When visible, each cell in the row has a checkbox in it. When I try to "Hide" the row, the row disappears but the checkboxes don't. It is very frustrating. I would like the checkboxes to "Hide" with the row. Currently I am having to delete and recreate the rows (and the checkboxes) everytime I need them. Let me know what you think,

Rick
Unfortunately you will have to hide the check box
via code. I.e accessing the objects visible property.

If you want code for this then post


Ivan