'FONCTION POUR JOUER UN SON WAVE
Sub joueBeepWAVEWindows2ApiBlack() 'le dernier argument pour asyncro ou syncro
Dim MonWav As String
MonWav = "C:\Windows\Media\Windows Exclamation.wav" '... chemin et nom à adapter
ExecuteExcel4Macro ("CALL(""winmm"",""PlaySoundA"",""JCJJ"",""" & MonWav & """, " & 0 & "," & &H1 & ")")
End Sub
Sub jouerson5() 's’exécute uniquement syncro (lache vba quand le son est fini)
Dim MonWav As String
MonWav = "C:\Windows\Media\Windows Exclamation.wav" '... chemin et nom à adapter
ExecuteExcel4Macro ("CALL(""winmm"",""sndPlaySoundA"",""JCJJ"",""" & MonWav & """, " & 0 & "," & 0 & ")")
End Sub