Share via


BalloonCheckBoxes Collection Object

BalloonCheckboxes

A collection of BalloonCheckBox objects that represent all the check boxes in the Office Assistant balloon.

Using the BalloonCheckBoxes Collection

Use the CheckBoxes property to return the BalloonCheckBoxes collection.

Use CheckBoxes(index), where index is a number from 1 through 5, to return a single BalloonCheckBox object. You can specify up to five check boxes (and five labels) per balloon; each check box appears when a value is assigned to its Text property. If you specify more than five check boxes, a run-time error occurs.

The following example creates a balloon with a heading, text, and three region choices. When the user selects one or more check boxes and then clicks OK, the specified procedure or procedures are called.

With Assistant.NewBalloon
    .Heading = "Regional Sales Data"
    .Text = "Select your region"
    For i = 1 To 3
        .CheckBoxes(i).Text = "Region " & i
    Next
    .Button = msoButtonSetOkCancel
    .Show
    If .CheckBoxes(1).Checked Then
        runregion1
    End If
    If .CheckBoxes(2).Checked Then
        runregion2
    End If
    If .CheckBoxes(3).Checked Then
        runregion3
    End If
End With

You cannot add check boxes to or remove check boxes from the BalloonCheckBoxes collection after the balloon has been displayed.

Remarks

Balloon check boxes display the user's choices until the user dismisses the balloon. You can use balloon labels in conjunction with the Select method to return a number corresponding to the user's choice of check boxes as soon as the user clicks the button beside the label. To pass values to the Select method based on the user's choice, you must have the balloon type set to msoBalloonTypeButtons.

Properties | Application Property | Count Property | Creator Property | Item Property | Name Property | Parent Property

Parent Objects

Child Objects