Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
preserve formatting option in pivot table option dialog box | Excel Discussion (Misc queries) | |||
with multiple option buttons on my form how do I isolate groups | Excel Worksheet Functions | |||
Two Groups of Option Buttons on Worksheet | Excel Discussion (Misc queries) | |||
Can I an option button in two groups? | Excel Worksheet Functions | |||
Option Buttons - groups | Excel Discussion (Misc queries) |