Hide rows that contain radio buttons

B

Baggins

I am trying to produce a form that if a user selects a "Yes" radio button,
additional questions appear with theire own radio buttons for a response.

I have managed to show/hide the additional questions by running a little
piece of VBA attached to the 1st radio buttons

Rows("22:34").Select
Selection.EntireRow.Hidden = False '(or True to hide them if no is
selected)

This works fine and the additional rows will disappear as planned.
Unfortunately it does not hid the additional radio buttons contained in those
rows.

Any ideas how to do this?
 
J

Jim Rech

Excel has option buttons if that's what you meant. There are two types -
from the Forms toolbar and from the Control Toolbox toolbar. If yours are
from Forms you'll have to add code to hide them. If from the Control
Toolbox you can change their positioning setting to "Move and Size with
Cells". Sometimes that results in controls being moved so you have to check
that out.

Not need to "select", btw:

Rows("22:34").Hidden = False

--
Jim
|I am trying to produce a form that if a user selects a "Yes" radio button,
| additional questions appear with theire own radio buttons for a response.
|
| I have managed to show/hide the additional questions by running a little
| piece of VBA attached to the 1st radio buttons
|
| Rows("22:34").Select
| Selection.EntireRow.Hidden = False '(or True to hide them if no is
| selected)
|
| This works fine and the additional rows will disappear as planned.
| Unfortunately it does not hid the additional radio buttons contained in
those
| rows.
|
| Any ideas how to do this?
|
 
B

Baggins

Jim,

Many thanks - I was unaware of the Control Box Toolbar - (although I don't
know how it's escaped me for so long!)

It works a treat.

Thanks for the other tip as well.

Cheers
 

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