Afficher un message
Vieux 17/11/2005, 17h20   #2 (permalink)
Gégé
Guest
 
Messages: n/a
Par défaut Re:Intégrer fichier audio sur Excel

Bonjour le forum, FaridP,

Essai cela...

Code:
Option Explicit
Private Declare Function PlaySound Lib 'winmm.dll' _
  Alias 'PlaySoundA' (ByVal lpszName As String, _
  ByVal hModule As Long, ByVal dwFlags As Long) As Long

Sub Audio()
Dim WAVFile As String
Const SND_ASYNC = &H1
Const SND_FILENAME = &H20000
    
    WAVFile = 'C:\\Windows\\Media\\Tada.wav' 'à adapter
    Call PlaySound(WAVFile, 0&, SND_ASYNC Or SND_FILENAME)
    
End Sub
@+
  Réponse avec citation