Salut Stéphane,
Merci pour ta réponse aussi rapide.
Ca marche en insérant un objet son wave dans la feuille. Il suffit juste d'activer l'objet dans le code. Et en plus c'est simple!!!
Pour info, je n'ai pas réussi à faire tourner la première solution proposée:
Sub PlayMIDI()
If Application.CanPlaySounds Then
mciExecute "play " & "C:\Winnt\Media\Passport.mid"
Else
MsgBox "Sound is not supported on your system !, " & vbCrLf _
& "but anyway, the code is processing", , "Désolé"
Exit Sub
End If
End Sub
La macro échoue sur "mciExecute"...
Peux-tu m'éclairer? (c'est juste pour ma culture personnelle, et ça pourrait peut-être servir aux autres...)
Merci encore.
Luc