das stimmt nicht
in der sound1 . rechte maustaste : Link speichern unter erhalt man eine zip datei
darin der folgende Code in einem Allgemeinen Modul. Nur das "ptrsafe" hab ich hinzugefügt. und das klappt super. Ohne eine Playerinstanz zu öffnen wie bei einem Shell32 Aufruf. Man müßte nur noch das Worksheet_change drumrum basteln.
Option Explicit
' API Funktion für Sound abspielen
Declare PtrSafe Function sndPlaySound32 Lib "winmm.dll" Alias _
"sndPlaySoundA" (ByVal lpszSoundName _
As String, ByVal uFlags As Long) As Long
Sub WAValsStart()
Call sndPlaySound32("c:\soundfile.wav", 1)
End Sub
|