Get return value from sound play function : Sound « Windows API « VBA / Excel / Access / Word






Get return value from sound play function

 
Private Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long
Sub playSound()
    Dim returnVal As Long
    returnVal = sndPlaySound("C:\myWave.wav", 0)
End Sub

 








Related examples in the same category

1.Makes a sound using the computer's built-in speaker.