Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
MadTodd
 
Posts: n/a
Default How do I hide the outline of a Forms Group Box?

I am using a couple of groups of option buttons but would prefer not to show
the actual box around the group. Is there a way to hide the outline?
  #2   Report Post  
Norman Jones
 
Posts: n/a
Default

Hi MadTodd,

You can use VBA code to do this:

Sub HideGroupBox()
Dim Sh As Worksheet

Set Sh = ActiveSheet
Sh.GroupBoxes("Group Box 1").Visible = False

End Sub


Change Group Box 1 to the name of your groupbox.


---
Regards,
Norman



"MadTodd" wrote in message
...
I am using a couple of groups of option buttons but would prefer not to
show
the actual box around the group. Is there a way to hide the outline?



  #3   Report Post  
Norman Jones
 
Posts: n/a
Default

Hi MaddTodd,

And to hide all the groupboxes, try:

Sub HideAllGroupBoxes()
Dim Sh As Worksheet
Dim gBox As GroupBox
Set Sh = ActiveSheet

For Each gBox In Sh.GroupBoxes
gBox.Visible = False
Next gBox

End Sub

---
Regards,
Norman


"MadTodd" wrote in message
...
I am using a couple of groups of option buttons but would prefer not to
show
the actual box around the group. Is there a way to hide the outline?



  #4   Report Post  
Dave Peterson
 
Posts: n/a
Default

And if there aren't too many...

ActiveSheet.GroupBoxes.Visible = False

(I'm not sure how many is too many, though.)



Norman Jones wrote:

Hi MaddTodd,

And to hide all the groupboxes, try:

Sub HideAllGroupBoxes()
Dim Sh As Worksheet
Dim gBox As GroupBox
Set Sh = ActiveSheet

For Each gBox In Sh.GroupBoxes
gBox.Visible = False
Next gBox

End Sub

---
Regards,
Norman

"MadTodd" wrote in message
...
I am using a couple of groups of option buttons but would prefer not to
show
the actual box around the group. Is there a way to hide the outline?


--

Dave Peterson
  #5   Report Post  
Norman Jones
 
Posts: n/a
Default

Hi Dave,

ActiveSheet.GroupBoxes.Visible = False


The difference is that the OP is paying *me* by the word!


(I'm not sure how many is too many, though.)


Are you aware of such a limit and, if so, do you know if it is a limit on
the number of objects which can be handled in a pass, or a limitation on the
number of objects?


---
Regards,
Norman



"Dave Peterson" wrote in message
...
And if there aren't too many...

ActiveSheet.GroupBoxes.Visible = False

(I'm not sure how many is too many, though.)



Norman Jones wrote:

Hi MaddTodd,

And to hide all the groupboxes, try:

Sub HideAllGroupBoxes()
Dim Sh As Worksheet
Dim gBox As GroupBox
Set Sh = ActiveSheet

For Each gBox In Sh.GroupBoxes
gBox.Visible = False
Next gBox

End Sub

---
Regards,
Norman





  #6   Report Post  
Dave Peterson
 
Posts: n/a
Default

I am aware that a limit exists when working with shapes/objects.

But I'm not sure what that limit is (or if it's a hard limit--or if it depends
on what's in use (memory??)).

I do know that the single line fails when there are lots (and quite a few people
have lots of shapes in worksheets based on posts around here).

I've never seen your looping code fail.

I'm not sure I understand the second portion. Since it's a one liner, I'm
guessing that it's based on the number of objects, since there's only one pass
(did that make sense???).



Norman Jones wrote:

Hi Dave,

ActiveSheet.GroupBoxes.Visible = False


The difference is that the OP is paying *me* by the word!

(I'm not sure how many is too many, though.)


Are you aware of such a limit and, if so, do you know if it is a limit on
the number of objects which can be handled in a pass, or a limitation on the
number of objects?

---
Regards,
Norman

"Dave Peterson" wrote in message
...
And if there aren't too many...

ActiveSheet.GroupBoxes.Visible = False

(I'm not sure how many is too many, though.)



Norman Jones wrote:

Hi MaddTodd,

And to hide all the groupboxes, try:

Sub HideAllGroupBoxes()
Dim Sh As Worksheet
Dim gBox As GroupBox
Set Sh = ActiveSheet

For Each gBox In Sh.GroupBoxes
gBox.Visible = False
Next gBox

End Sub

---
Regards,
Norman


--

Dave Peterson
  #7   Report Post  
Norman Jones
 
Posts: n/a
Default

Hi Dave,

Thank you for the additional information.

---
Regards,
Norman



"Dave Peterson" wrote in message
...
I am aware that a limit exists when working with shapes/objects.

But I'm not sure what that limit is (or if it's a hard limit--or if it
depends
on what's in use (memory??)).

I do know that the single line fails when there are lots (and quite a few
people
have lots of shapes in worksheets based on posts around here).

I've never seen your looping code fail.

I'm not sure I understand the second portion. Since it's a one liner, I'm
guessing that it's based on the number of objects, since there's only one
pass
(did that make sense???).



  #8   Report Post  
MadTodd
 
Posts: n/a
Default

Thanks for the help folks. I know just enough VBA to be dangerous at a
cocktail party, but nothing ventured nothing gained!

"Norman Jones" wrote:

Hi Dave,

Thank you for the additional information.

---
Regards,
Norman



"Dave Peterson" wrote in message
...
I am aware that a limit exists when working with shapes/objects.

But I'm not sure what that limit is (or if it's a hard limit--or if it
depends
on what's in use (memory??)).

I do know that the single line fails when there are lots (and quite a few
people
have lots of shapes in worksheets based on posts around here).

I've never seen your looping code fail.

I'm not sure I understand the second portion. Since it's a one liner, I'm
guessing that it's based on the number of objects, since there's only one
pass
(did that make sense???).




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
hide column but show chart Svetlana Charts and Charting in Excel 1 January 14th 05 10:49 AM
Adding formatted cells to an outline ? Glenn Excel Discussion (Misc queries) 4 January 11th 05 05:10 PM
border color in forms group box Yvette Excel Discussion (Misc queries) 1 December 11th 04 12:13 AM
Why can't I show or hide rows in an outline on a protected sheet? rwlass Excel Discussion (Misc queries) 1 December 9th 04 05:38 PM
Group buttons from the forms toolbar GregR Excel Discussion (Misc queries) 1 December 7th 04 02:25 AM


All times are GMT +1. The time now is 07:24 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"