Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 37
Default option groups, formatting

I have 10 option groups on a form but want to make the
group outlines invisible. Is there a way to do this?

The option groups were placed using the Form menu.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default option groups, formatting

Dave,

You can hide group boxes and have the individual groups still operate as
expected. Assuming a naming convention where all of your group boxes have a
name beginning with "grp", the following code will toggle the view of those
groups from visible to hidden:

Sub toggleGroupsHidden()
Dim shp As Shape
For Each shp In ActiveSheet.Shapes
If Left(shp.Name, 3) = "grp" Then
shp.Visible = Not shp.Visible
End If
Next
End Sub


Charles
www.officezealot.com


"dave" wrote in message
...
I have 10 option groups on a form but want to make the
group outlines invisible. Is there a way to do this?

The option groups were placed using the Form menu.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default option groups, formatting

You can get them all visible/hidden with:

Option Explicit
Sub test01()
ActiveSheet.GroupBoxes.Visible = False
End Sub

Or you could cycle through all the groupboxes:
Sub test02()
Dim GBox As GroupBox
For Each GBox In ActiveSheet.GroupBoxes
GBox.Visible = False
Next GBox
End Sub

Or you could go through the shapes collection
Sub test03()
Dim myShape As Shape
For Each myShape In ActiveSheet.Shapes
If myShape.Type = msoFormControl Then
If myShape.FormControlType = xlGroupBox Then
myShape.Visible = False
End If
End If
Next myShape
End Sub

And if you had some you want visible and some hidden, you could use their names:

ActiveSheet.GroupBoxes("group box 1").Visible = False

dave wrote:

I have 10 option groups on a form but want to make the
group outlines invisible. Is there a way to do this?

The option groups were placed using the Form menu.


--

Dave Peterson

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
preserve formatting option in pivot table option dialog box Dave F Excel Discussion (Misc queries) 4 May 8th 08 07:25 PM
with multiple option buttons on my form how do I isolate groups sabrina Excel Worksheet Functions 4 September 17th 07 10:06 PM
Two Groups of Option Buttons on Worksheet Jim May Excel Discussion (Misc queries) 0 June 24th 06 09:34 PM
Can I an option button in two groups? Jono Excel Worksheet Functions 4 March 14th 06 03:38 PM
Option Buttons - groups Ciara Excel Discussion (Misc queries) 4 May 18th 05 05:41 PM


All times are GMT +1. The time now is 03:43 PM.

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"