Is there any property to hide the border of a xlGroupBox?

kishor_ys

New Member
Joined
Jun 12, 2008
Messages
7
Here is the sample code

Set sGroupBox = Sheets(1).Shapes.AddFormControl(xlGroupBox, _
Cells(1, 2).Left, Cells(1, 2 + 1).Top, 200, 16)
sGroupBox.TextFrame.Characters.Text = ""


which creates a group box with thin border.

Is there any property to hide the border of a group box?
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.

Jon Peltier

MrExcel MVP
Joined
May 14, 2003
Messages
5,271
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
This requires some faking, since Excel doesn't let us access the groupbox's border. You need your groupbox, a rectangle, and your option buttons. Draw the rectangle so it is slightly larger than the groupbox, give it a fill color to match the background, and remove its border. Set the stacking order of the objects so the group box is under all other objects, the rectangle is next, and all the buttons are on top.
 
Upvote 0

brites

Board Regular
Joined
Aug 19, 2004
Messages
224
I just had the same problem and found this solution:

You dont need a macro, just a code.

Hit alt-f11 to get to the VBE
hit ctrl-G to see the immediate window

type this in and hit enter:
activesheet.groupboxes.visible = false

This hides all the groupboxes on the activesheet.

If you are running excel2007 it means you dont even need to save as a macro workbook, a regular file will do it.

Cheers!
 
Upvote 0

Forum statistics

Threads
1,191,219
Messages
5,985,335
Members
439,958
Latest member
qb0000

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
Top