MsgBeep Procedure

Plays a system defined sound.

Syntax

[ lReturn = ] MsgBeep ( [ enType ] )

The MsgBeep procedure syntax has the following parts:

 

Name

Type

Description

lReturn

Long

Return code. Returns 0 is successful, -1 if failed.

enType

Val enumAMsgBoxType

Type of system sound to be played. If nothing is given, it plays the system standard beep.

Where

enumAMsgBoxType can be one of the following values:

 

Name

Value

Description

aMsgIconHand

0x10

Hand (stop) icon

aMsgIconQuestion

0x20

Question icon

aMsgIconExclamation

0x30

Exclamation (warning) icon

aMsgIconAsterisk

0x40

Asterisk (information) Icon

aMsgIconNoDefault

0x50

No Default icon

Example

The following example plays the system Exclamation sound:

MsgBeep(aMsgIconExclamation)

See Also

InputBox, MsgBox