Gruppe
Ereignis
Problem
Wie kann ich beim Start einer Arbeitsmappe automtisch eine WAVDatei abspielen lassen?
ClassModule: DieseArbeitsmappe
Private Sub Workbook_Open()
Call WAValsStart
End Sub
StandardModule: basMain
Declare Function sndPlaySound32 Lib "winmm.dll" _
Alias "sndPlaySoundA" (ByVal lpszSoundName _
As String, ByVal uFlags As Long) As Long
Sub WAValsStart()
On Error GoTo ERRORHANDLER
Call sndPlaySound32("c:\windows\drumroll.wav", 1)
End
ERRORHANDLER:
MsgBox "Bitte Pfad und Namen der WAV-Datei anpassen!"
End Sub