Radio Button Grouping - Excel 2007

Munich

New Member
Joined
Jul 10, 2006
Messages
31
I have a sheet where I am trying to build different sets of 5 radio buttons for about 100 questions. I would prefer not to have to Group them together, as I don't really want the group box borders to be shown around the outside.

The other tricky issue is that I want this to look perfect, so once I create the initial 5 buttons together, I would like to be able to start to copy them around. However, the second set of copied buttons is an extension of the first set. I need for them to be a new group. Is there any way around this problem?

Thanks in advance for any help.

Ernie
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Hi Ernie

The easiest is to use the GroupBoxes.

- insert the 5 radio buttons and enclose them inside a group box

- select all the 6 objects and copy them, they will be copied as a new group

- make the groupbox objects invisible (use vba, property Visible)
 
Upvote 0
Thanks for the help, but I have no idea how to do the following:

"- make the groupbox objects invisible (use vba, property Visible) "

I assume this makes the borders of the groupbox invisible? That would be a good workaround, but again, I am not that good with visual basic to know where/how to do this. Can you provide a little more details?

Thanks again.

Ernie
 
Upvote 0
In the VB Editor insert a module (Insert->Module), if it's the first one you are inserted it will have the name Module1, and paste:

Code:
Sub GroupBoxesHide()

Dim GrpBox As GroupBox
For Each GrpBox In ActiveSheet.GroupBoxes
    GrpBox.Visible = False
Next GrpBox
End Sub

Run this code and all the groupboxes in the activesheet will be made invisible.
 
Upvote 0
pgc01,

Great. However I assumed that if I changed the False to True and ran it again, they would re-appear, but they did not. Any thing I am doing wrong with this assumption?

Ernie
 
Upvote 0
No, your assumption is correct.

Maybe when you ran it the second time the active sheet was not the one that contains the groupboxes?
 
Upvote 0
pgc01,

Tried it again and worked like a charm. Thanks for the help. This will allow me to move forward on my project (and was annoying the heck out of me for most of yesterday).

Ernie
 
Upvote 0

Forum statistics

Threads
1,223,098
Messages
6,170,106
Members
452,302
Latest member
TaMere

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top