Assistant![]() ![]() ![]() ![]() ![]() |
本主题中的某些内容可能不适用于某些语言。
代表“Office 助手”气球中的一个标签。BalloonLabel 对象是 BalloonLabels 集合中的一个成员。
用 Labels(index) 可返回一个 BalloonLabel 对象,其中的 index 是一个 1 到 5 之间的数字。一个气球中可有 1 到 5 个标签,每个标签在其 Text 属性赋值后就会显示出来。
以下示例创建一个气球,要求用户单击与其年龄相对应的标签。
With Assistant.NewBalloon
.Heading = "Check Your Age Group."
.Labels(1).Text = "Under 30."
.Labels(2).Text = "30 to 50."
.Labels(3).Text = "Over 50."
.Text = "Which of the following " _
& .Labels.Count & " choices apply to you?"
.Show
End With
在用户清除该气球之前,气球复选框将一直显示用户的选择。在用户单击标签旁的按钮后,气球标签立即返回与用户在 Select 方法中的选择相对应的数字。只有将该气球的类型设为 msoBalloonTypeButtons 才能将值传给与用户选择相关的 Select 方法。