Checkboxes Property

Microsoft Office Visual Basic

Returns the BalloonCheckboxes collection that represents all the check boxes contained in the specified balloon. Read-only.

For information about returning a single member of a collection, see Returning an Object from a Collection.

Example

This example creates a balloon with a heading, text, and three region choices. When the user clicks OK in the balloon, data for the selected region or regions is printed.

With Assistant.NewBalloon
    .Heading = "Regional Sales Data"
    .Text = "Select the region(s) you want to print."
    For i = 1 To 3
        .CheckBoxes(i).Text = "Region " & i
    Next
    .Button = msoButtonSetOkCancel
    If .Show = msoBalloonButtonOK Then
        dataPrinted = 0
        For i = 1 To 3
            If .CheckBoxes(i).Checked = True Then
                ' Code to print region data.
                dataPrinted = dataPrinted + 1
                MsgBox "Region " & i & " data printed."
            End If
        Next
        If dataPrinted = 0 Then MsgBox "No data printed."
    End If
End With