Remove Group Box border lines

G

Guest

I followed the great instructions given by Dave Peterson to remove the visible group boxes.
Hit alt-f11 to get to the VB
hit ctrl-G to see the immediate windo
type this in and hit enter
activesheet.groupboxes.visible = fals
This hides all the groupboxes on the activesheet

I tried it on a few sample boxes and it worked fine. I completed my spread and am now receiving this error message
Run-time error '1004
Unable to set the Visible property of the GroupBoxes class

Could I perhaps have too many group boxes in my sheet
 
D

Dave Peterson

It looks like too many will give you this error.

How about a small macro:

Option Explicit
Sub GBVisibleToggle()
Dim myGB As GroupBox
For Each myGB In ActiveSheet.GroupBoxes
myGB.Visible = False 'true
Next myGB
End Sub

You can put it in another workbook so that you can run it against any worksheet
that you want. Just open the workbook and go to the real sheet and hit alt-f8
and double click the name of that macro.

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

By the way, I put 1000 checkboxes on a worksheet and it blew up, too. How many
do you have?

(I didn't take the time to see if I could find the magic number--I'm not sure if
there is a single one!)
 

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