Bonjour tous,
Lire les fichiers .wav selon les versions
Avant en 32bits je déclarais ceci qui fonctionnait
Private Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" _
(ByVal lpstrCommand As String, ByVal lpstrReturnString As String _
, ByVal uReturnLength As Long, ByVal hwndCallback As Long) As Long
Private Declare Function GetShortPathName Lib "kernel32" Alias _
"GetShortPathNameA" (ByVal lpszLongPath As String _
, ByVal lpszShortPath As String, ByVal lBuffer As Long) As Long
Private Song As String
----------------------------------------------------------------------
pour passer en 64bits j'ai ceci qui fonctionne en 64bits
#If VBA7 Then
Declare PtrSafe Function PlaySound Lib "winmm.dll" (ByVal pszsound As String, ByVal hmod As Long, ByVal fdwsound As Long) As Long
#Else
'ici ca passe pas en 32 bits, je ne sais pas quoi mettre, l'ancien code bug
'Declare Function PlaySound Lib "winmm.dll" (ByVal pszsound As String, ByVal hmod As Long, ByVal 'fdwsound As Long) As Long
#End If
----------------------------------------------------------------------
Sub woot()
PlaySound ThisWorkbook.Path & "\woot", 0, 1
End Sub
Si besoin d'un fichier
Lien du chargement du fichier Poker sur xld
Je souhaite mettre le son quel que soit les bits
Bruno