Button help

J

James

Can i set up a radio button (the circle selection thing i think), that when
selected would then show certain cells in a worksheet or if it's not selected
it doesn't show the cells?
 
F

FSt1

hi
not cells....rows or columns. and you would be much better of using a check
box instead of an option button(radio). options button work better as a group
and not alone. a check box works much better if it's just the only one but
can work as a group.
what rows/columns do you want to show/hide?

regards
FSt1
 
F

FSt1

hi
very possible.
from the control toolbox(not the forms), select the checkbox and drag it to
where ever you want it. size it. you can resize the check box itself only the
lable that comes with it.
right click the checkbox, select view code. paste this code into it.
Private Sub CheckBox1_Click() 'this should default in
If CheckBox1.Value = True Then
Rows("20:25").Hidden = True
Else
Rows("20:25").Hidden = False
End If
End Sub 'this should default it

when done exit the vb editor but clicking the red X.
exit design mode but click the protractor on the control toolbox. close the
control toolbox.
test the check box. post back if problems.

regards
FSt1
 

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

Top