BalloonCheckBox Object

Microsoft Office Visual Basic

BalloonCheckBox Object

BalloonCheckbox

Represents a check box in the Office Assistant balloon. The BalloonCheckBox object is a member of the BalloonCheckBoxes collection.

Using the BalloonCheckBox Object

Use CheckBoxes(index), where index is a number from 1 through 5, to return a single BalloonCheckBox object. There can be up to five check boxes in one balloon; each check box appears when a value is assigned to its Text property.

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

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
		

Remarks

Balloon check boxes display the user's choices until the user dismisses the balloon. You can use balloon labels to return a number corresponding to the user's choice in the Select method 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.