Iceberg
Board Regular
- Joined
- Mar 12, 2008
- Messages
- 79
Hi,
I have a spreadsheet that is essentially a checklist for others to use. I have used ActiveX checkboxes on the list. I also have two option buttons at the top of the list. One of them hides some rows and the other one unhides them.
To avoid having floating checkboxes left over when rows are hidden, I've been using the CheckBox.Visible = True/False command depending which option button is selected. Here's a code sample:
...and the other option button does the reverse. Things generally work fine, but the problem pops up when I have the rows & checkboxes hidden and I select Print Preview or actually print the checklist. The next time I select the option button that unhides the rows, the checkboxes are gone! The things is, they are still there SOMEWHERE, because I tried adding three more checkboxes and renaming them "CheckBox21", etc., and I get an error saying "ambiguous name detected".
Oh where oh where have my checkboxes gone??
I have a spreadsheet that is essentially a checklist for others to use. I have used ActiveX checkboxes on the list. I also have two option buttons at the top of the list. One of them hides some rows and the other one unhides them.
To avoid having floating checkboxes left over when rows are hidden, I've been using the CheckBox.Visible = True/False command depending which option button is selected. Here's a code sample:
Rich (BB code):
Private Sub OptionButton6_Click()
CheckBox21.Visible = False
CheckBox22.Visible = False
CheckBox23.Visible = False
Rows("28:33").Select
Selection.EntireRow.Hidden = True
End Sub
...and the other option button does the reverse. Things generally work fine, but the problem pops up when I have the rows & checkboxes hidden and I select Print Preview or actually print the checklist. The next time I select the option button that unhides the rows, the checkboxes are gone! The things is, they are still there SOMEWHERE, because I tried adding three more checkboxes and renaming them "CheckBox21", etc., and I get an error saying "ambiguous name detected".
Oh where oh where have my checkboxes gone??