Hi, how do you get rid/make the box around grouped buttons clear?

J

Jon Peltier

I use a white rectangle, put the group box behind the rectangle and the
grouped buttons in front of it. Not too elegant, but it works.

- Jon
 
D

Dave Peterson

Is this a groupbox from the Forms toolbar?

If yes, you can hide the groupbox in code. Or with just a one liner:

Hit alt-f11 to get to the VBE
hit ctrl-g to see the immediate window
type this and hit enter.

activesheet.groupboxes.visible = false

If you only want to hide a single groupbox, you can use something like:

activesheet.groupboxes("group box 1").visible = false

robbieswife2b wrote:
 
J

Jon Peltier

Good idea. I guess since it can't be hidden in the UI, I just never tried it
in code. You'd have to remember it was hidden when you had to move your
controls around.

- Jon
 
W

Wanna Learn

Hello I tried to hide the groupbox as describe below and nothing happens
what I'm I missing
My Steps
I Hit Alt F11
then ctrl G
I typed copied in the immediate , activesheet.groupboxes.visible = false
hit enter
went back to the excel sheet and the box is still visible around the 2
buttons.
 
D

Dave Peterson

Are you sure that the sheet with the groupboxes was the activesheet?

Are you sure you used a groupbox (and not a rectangle or some other shape)?
 
W

Wanna Learn

Thanks Dave

I have Excel 2002 ...Just to test this....I started with a new workbook...
added 3 buttons from the forms tool bar then added the group box from the
forms toolbar
when I hit Alt F11 the window that comes up says Microsoft Visual Basics -
Book 7 then I hit ctrl G the immediate window comes up then I added
activesheet.groupboxes.visible = false return to the worksheet and the boxes
are still visible
I also tried from the active sheet view code which brings me to Microsoft
Visual Basic - Book 7 - [Sheet 1 (Code)] I hit ctrl G then I added to the
immediate window activesheet.groupboxes.visible = false
In both cases when I return to sheet 1 the boxes are still there Again
Thank you Dave
 
D

Dave Peterson

Did you hit enter after you typed:
activesheet.groupboxes.visible = false
into the immediate window

It worked for me.

Just in case the wrong worksheet is the activesheet, you could try:
worksheets("sheet1").groupboxes.visible = false
(make sure you hit enter after you type this)

Wanna said:
Thanks Dave

I have Excel 2002 ...Just to test this....I started with a new workbook...
added 3 buttons from the forms tool bar then added the group box from the
forms toolbar
when I hit Alt F11 the window that comes up says Microsoft Visual Basics -
Book 7 then I hit ctrl G the immediate window comes up then I added
activesheet.groupboxes.visible = false return to the worksheet and the boxes
are still visible
I also tried from the active sheet view code which brings me to Microsoft
Visual Basic - Book 7 - [Sheet 1 (Code)] I hit ctrl G then I added to the
immediate window activesheet.groupboxes.visible = false
In both cases when I return to sheet 1 the boxes are still there Again
Thank you Dave
 
W

Wanna Learn

Dave
You are fantastic........yes once I hit entered the boxes dissapeared.
Thanks Thanks Thanks

Dave Peterson said:
Did you hit enter after you typed:
activesheet.groupboxes.visible = false
into the immediate window

It worked for me.

Just in case the wrong worksheet is the activesheet, you could try:
worksheets("sheet1").groupboxes.visible = false
(make sure you hit enter after you type this)

Wanna said:
Thanks Dave

I have Excel 2002 ...Just to test this....I started with a new workbook...
added 3 buttons from the forms tool bar then added the group box from the
forms toolbar
when I hit Alt F11 the window that comes up says Microsoft Visual Basics -
Book 7 then I hit ctrl G the immediate window comes up then I added
activesheet.groupboxes.visible = false return to the worksheet and the boxes
are still visible
I also tried from the active sheet view code which brings me to Microsoft
Visual Basic - Book 7 - [Sheet 1 (Code)] I hit ctrl G then I added to the
immediate window activesheet.groupboxes.visible = false
In both cases when I return to sheet 1 the boxes are still there Again
Thank you Dave

Dave Peterson said:
Are you sure that the sheet with the groupboxes was the activesheet?

Are you sure you used a groupbox (and not a rectangle or some other shape)?



Wanna Learn wrote:

Hello I tried to hide the groupbox as describe below and nothing happens
what I'm I missing
My Steps
I Hit Alt F11
then ctrl G
I typed copied in the immediate , activesheet.groupboxes.visible = false
hit enter
went back to the excel sheet and the box is still visible around the 2
buttons.

:

Is this a groupbox from the Forms toolbar?

If yes, you can hide the groupbox in code. Or with just a one liner:

Hit alt-f11 to get to the VBE
hit ctrl-g to see the immediate window
type this and hit enter.

activesheet.groupboxes.visible = false

If you only want to hide a single groupbox, you can use something like:

activesheet.groupboxes("group box 1").visible = false

robbieswife2b wrote:
 

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