Hallo Karsten,
das geht so. ' ********************************************************************** ' Modul: Modul1 Typ: Allgemeines Modul ' **********************************************************************
OptionExplicit
DeclareFunction waveOutGetNumDevs Lib"WINMM" () AsInteger DeclareFunction sndPlaySound Lib"WINMM" Alias "sndPlaySoundA" _ (ByVal lpszSoundName As String, ByVal uFlags AsLong) AsLong
Sub playWAV() Dim result As Long, strWAVFile AsString If waveOutGetNumDevs() <> 0 Then strWAVFile = "C:\WINDOWS\MEDIA\Ding.wav" result = sndPlaySound(strWAVFile, 0) EndIf EndSub