Mega Code Archive

 
Categories / VisualBasic Script / Windows API
 

Call windows API to play a sound

Private Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long Public Sub PlaySound(SoundFile As String)     sndPlaySound SoundFile, 1 End Sub