VBA/Excel/Access/Word/Windows API/Sound

Материал из VB Эксперт
Перейти к: навигация, поиск

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



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

 
Private Sub ge()
     Beep
End Sub