Share via


BalloonError Property

MsoBalloonErrorType

MsoBalloonErrorType can be one of these MsoBalloonErrorType constants.
msoBalloonErrorBadCharacter The balloon contains an ASCII control character other than CR or LF and less than 32.
msoBalloonErrorBadPictureRef The balloon contains a graphic that couldn't be displayed because the file doesn't exist or because the graphic isn't a valid .BMP or .WMF file.
msoBalloonErrorBadReference The balloon contains an unrecognized or unsupported reference.
msoBalloonErrorButtonlessModal The balloon you attempted to display is modal, but it contains no buttons. The balloon won't be shown because it can't be dismissed.
msoBalloonErrorButtonModeless The balloon you attempted to display is modeless, contains buttons, and has no procedure assigned to the Callback property. The balloon won't be shown because a callback procedure is required for modeless balloons.
msoBalloonErrorCharNotTopmostForModal The modal balloon was requested by an application that isn't the active application. Microsoft Office renders balloons for the active (topmost) application only.
msoBalloonErrorCOMFailure The balloon could not be displayed because of a COM failure.
msoBalloonErrorNone No error was encountered.
msoBalloonErrorOther The balloon won't appear because some other error occurred, such as another modal balloon is already active.
msoBalloonErrorOutOfMemory The balloon won't appear because there is insufficient memory.
msoBalloonErrorTooBig The balloon is too big to appear on the screen.
msoBalloonErrorTooManyControls The balloon contains more than twenty controls (check boxes or labels).

Example

This example creates a balloon that generates an error. The error is generated because the balloon is created without a way to dismiss it: the button type is set to msoButtonSetNone and the default balloon mode is msoModeModal, resulting in a buttonless, modal balloon. Note that there's no way to dismiss a buttonless modal balloon.

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

Applies to | Assistant Object

See Also | Balloon Object | BalloonType Property | Creating and Modifying Balloons | Overview of the Office Assistant | Show Method