Produces a tone through the computer speaker.
Beep
The frequency and duration of the tone depends on the hardware.
This example beeps and displays a message in a box if the variable balance is less than 0. (If you have a set of speakers hooked up to your computer, you might need to turn them on to hear the beep.)
Sub main
Dim expenses, balance, msgtext
balance=InputBox("Enter your account balance")
expenses=1000
balance=balance-expenses
If balance<0 then
Beep
Msgbox "I'm sorry, your account is overdrawn."
Else
Msgbox "Your balance minus expenses is: " & balance
End If
End Sub