Private Declare Function PlaySound Lib "winmm.dll" _
Alias "PlaySoundA" (ByVal lpszName As String, _
ByVal hModule As Long, ByVal dwFlags As Long) As Long
Private Declare Function mciExecute Lib "winmm.dll" _
(ByVal lpstrCommand As String) As Long
Const SND_SYNC = &H0
Const SND_ASYNC = &H1
Const SND_FILENAME = &H20000
'-------------------------------------------
Sub JouerSon()
Dim Chemin As String
'à adapter ....selon où le fichier .Wav est situé...
'ChDir ("C:\WINDOWS\Media")
Chemin = "C:\WINDOWS\Media"
PlaySound Chemin & "\tada.wav", 0, 0
Chemin = ThisWorkbook.Path
PlaySound Chemin & "\Knockwav.wav", 0, 0
PlaySound Chemin & "\RING1.wav", 0, 0
End Sub
'-------------------------------------------