Missing checkboxes?

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:

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?? :confused:
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Are the checkboxes maybe further down the sheet? There is an option within the checkbox properties that says something to the effect of move or size with cells? Maybe they just got shifted.

In the immediate window maybe try:

ActiveSheet.Shapes("Checkbox21").Select

Hope that helps.
 
Upvote 0
Thanks schielrn. Sure enough, they got shifted down the sheet to about row 34 (the row immediately beneath the last row being hidden) and were all stacked one on top of the other.

So my next question - is there any way to stop this from happening?
 
Upvote 0
Right click on them and go to the format control. Then click on the Properties tab and select the appropriate radio button to not have them move or resize with the cells.

Hope that helps.
 
Upvote 0

Forum statistics

Threads
1,222,950
Messages
6,169,209
Members
452,239
Latest member
fadhlatef

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top