Hide a Control Box

kop442000

Board Regular
Joined
Jul 1, 2004
Messages
179
I have some radio buttons in Excel (2011 Mac), and they are grouped by a Group Box.

I want to make the Group Box invisible. I searched on the internet and found that I could do that with VBA by entering:

ActiveSheet.GroupBoxes.Visible = False

in the VBA window that corresponds to the relevant worksheet. I did that but there seems to be no difference. Do I have to do something else to activate the change?

Thank you.
 
That line of code should work - as long as you haven't grouped the Group Box with anything.
Once you group it (such as with the contents within it) - it is no longer a Group Box.
From what I can tell, the Group Box is mainly visual, providing some aid in grouping controls.. but doesn't affect the visibility of the controls within it.
You would have to write separate code to hide the controls within it.

It's not as friendly as the Frame control often used on userforms.
 
Upvote 0
Thank you for the reply. This is my first time using anything from the developer tab, so I might be misunderstanding the fundamentals. Let me go a little further back:

The sheet I am making is to be full of various groups of radio buttons for a user to select. I understand that I have to use a Group Box to tell the worksheet which radio buttons I want to be connected to each other.

However, I now have a box saying "Group Box 17" or whatever around any set of radio buttons. I don't want this to be visible to the user. Isn't there an easy way to hide this?

Thank you.
 
Upvote 0
oh! you want to hide just the box. Well, your line should work, as long as the box isn't grouped with anything else.
Since it specified ActiveSheet - the sheet must be active for it to work.
Though, it's better to specify the sheet, like this (if your sheet were called Sheet1):
Worksheets("Sheet1").GroupBoxes.Visible = false
 
Upvote 0
the image link didn't work. Is there any way you can send me the workbook? If so, click the MrExcel.com Consulting link in my signature to email me (@mrexcel.com). Reference this thread in your message. I will then post my findings here.
 
Upvote 0

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