Hiding Checkbox from "Forms" Toolbar

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
 
K

kkknie

The problem is that the checkbox is a shape...

Sheets("Sheet1").Shapes("Check Box 1").Visible = False
 
B

bg18461

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
 
D

Dave Peterson

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.
 
Top