Checkboxes 属性

       

返回 BalloonCheckboxes 集合。该集合代表指定气球中的所有复选框。只读。

有关返回单个集合成员的详细信息,请参阅返回集合中的对象

示例

本示例创建一个带标题、文字和三个区域选项的气球。当用户单击该气球中的“确定”按钮时,就会打印出所选区域中的数据。

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