Close Method

Applies To

Balloon object.

Description

Closes the active modeless balloon.

Syntax

expression.Close

expression Required. An expression that returns a Balloon object.

Example

This example displays a balloon that contains instructions for selecting a printer. After the user clicks the OK button on the balloon, the ProcessPrinter procedure is run and the balloon is closed.

Sub shar()
Set bln = Assistant.NewBalloon
With bln
    .Heading = "Instructions for Choosing a Printer."
    .Text = "Click OK when you've chosen a printer."
    .Labels(1).Text = "Choose File, Print."
    .Labels(2).Text = "Click Setup."
    .Labels(3).Text = "Select the name of the printer."
    .BalloonType = msoBalloonTypeNumbers
    .Mode = msoModeModeless
    .Callback = "ProcessPrinter"
    .Button = msoButtonSetOK
    .Show
End With
End Sub

Sub ProcessPrinter(bln As Balloon, ibtn As Long, _
    iPriv As Long)
    Assistant.Animation = msoAnimationSearching
    'Insert printer-specific code
    bln.Close
End Sub