This documentation is archived and is not being maintained.

BalloonLabels Collection Object

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.


Assistant object
Aa831758.parchild(en-us,office.10).gifBalloon object,office.10).gifAa831758.parmult(en-us,office.10).gifBalloonCheckBoxes collection (BalloonCheckBox object),office.10).gifAa831758.parchild(en-us,office.10).gifBalloonLabels collection (BalloonLabel object)

A collection of BalloonLabel objects that represent all the labels in the Office Assistant balloon.

Using the BalloonLabels Collection

Use the Labels property to return the BalloonLabels collection.

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

The following example creates a balloon containing three choices. The variable returnValue is set to the return value of the Show method, which will be 1, 2, or 3, corresponding to the label the user clicks. The example returns the value of the variable returnValue, which you can either pass to another procedure or use in a Select Case statement.

Set b = Assistant.NewBalloon
With b
    .Heading = "This is my heading"
    .Text = "Select one of these things:"
    .Labels(1).Text = "Choice One"
    .Labels(2).Text = "Choice Two"
    .Labels(3).Text = "Choice Three"
    returnValue = .Show
End With


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.