GroupBox Object

Description

Represents a static frame used to label and group sets of option buttons (OptionButton objects) and other controls on a chart sheet, dialog sheet, or worksheet. Group boxes control how option buttons select and clear. All option buttons with an upper-left corner contained within the group box boundaries are considered to be part of a group, and only one option button within that group can be turned on at any given time.

Group boxes have no font or background formatting, but group boxes on dialog sheets do have an accelerator key. Group boxes can be positioned and sized.

Do not confuse GroupBox objects, which group option buttons on a dialog sheet, with GroupObject objects, which combine objects into a single logical collection but do not affect dialog sheet behavior.

Accessors

The GroupBox object is a member of the GroupBoxes collection. The GroupBoxes collection contains all the GroupBox objects on a single sheet. Use the Add method to create a new group box and add it to the collection.

To access a single member of the collection, use the GroupBoxes method with the index number or name of the group box as an argument.

The following example sets the caption for group box one on the dialog sheet named "Dialog1."


DialogSheets("dialog1").GroupBoxes(1).Caption = "Test Group"

The group box name is shown in the Name Box when the group box is selected. Use the Name property to set or return the group box name. The following example hides the group box named "Group Box 14" on dialog sheet one.


DialogSheets(1).GroupBoxes("group box 14").Visible = False

Properties

Accelerator Property, Application Property, BottomRightCell Property, Caption Property, Creator Property, Display3DShading Property, Enabled Property, Height Property, Index Property, Left Property, Locked Property, LockedText Property, Name Property, OnAction Property, Parent Property, PhoneticAccelerator Property, Placement Property, PrintObject Property, Text Property, Top Property, TopLeftCell Property, Visible Property, Width Property, ZOrder Property.

Methods

BringToFront Method, Characters Method, CheckSpelling Method, Copy Method, CopyPicture Method, Cut Method, Delete Method, Duplicate Method, Select Method, SendToBack Method.