Hiding Checkbox from "Forms" Toolbar

  • Thread starter Thread starter bg18461
  • Start date Start date
B

bg18461

I have some rows that I want to hide in my spreadsheet, I also hav
checboxes within those rows to hide. When I hide the rows, th
checkboxes remain. I know if i use the checkboxes from the contro
menu I could change the properties to allow it to be hidden with th
cell, however size of the program is an issue and the forms objects ar
smaller. Is there code like checkbox1.visible = false i can run wit
me hide rows macro, or some other formatting property i am missing.
TI
 
The problem is that the checkbox is a shape...

Sheets("Sheet1").Shapes("Check Box 1").Visible = False
 
Another question, how would you put this line of code in a for loop
ex:

For i = 1 To 10
Sheets("Sheet1").Shapes_(\"Check_Box\"_&_i)_.Visible = True
next i

I know this will not work, so how can i write the code to make it work
 
One way:

dim i as long
for i = 1 to 10
Sheets("Sheet1").Shapes("Check Box " & i).Visible = False
next i

I'm not sure what the backslashes and underscores do, though.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top