ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Hide rows that contain radio buttons (https://www.excelbanter.com/excel-discussion-misc-queries/202979-hide-rows-contain-radio-buttons.html)

Baggins

Hide rows that contain radio buttons
 
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?


Jim Rech

Hide rows that contain radio buttons
 
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
"Baggins" wrote in message
...
|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?
|


Baggins

Hide rows that contain radio buttons
 
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


All times are GMT +1. The time now is 05:26 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com