BalloonError 属性

       

返回显示所记录的最后一条气球错误的值。MsoBalloonErrorType 类型,只读。

示例

本示例创建一个气球,该气球将产生一个错误。错误原因是由于创建该气球时没有为其设置取消方法:由于该按钮的类型被设置为 msoButtonSetNone,并且默认气球模态为 msoModeModal,因此产生了一个无按钮的模态气球。注意:无法取消一个无按钮的模态气球。

With Application.Assistant
With .NewBalloon
    .Heading = "This will never show."
    .Text = "Imagine a balloon here."
    .Button = msoButtonSetNone
    .Show
End With
.Visible = True
If .BalloonError = msoBalloonErrorButtonlessModal Then
    MsgBox "You need a button to dismiss the balloon."
End If
End With