Hello realniceguy2000,
You need to add in the SND_LOOP constant.
Declare Function PlaySound Lib "winmm.dll" Alias "sndPlaySoundA" _
(ByVal lpszName As String, ByVal dwFlags As Long) As Long
'Put in Standard module, only, like: Module1!
Const SND_SYNC = &H0
Const SND_ASYNC = &H1
Const SND_LOOP = &H8
Const SND_FILENAME = &H20000
Sub PLAYWAV3()
Dim wavefile, x
wavefile = "wmpaud7.wav"
Call PlaySound(wavefile, SND_ASYNC Or SND_LOOP Or SND_FILENAME)
End Sub
To stop the sound use this macro.
Sub StopSound()
Call PlaySound("", 0, 0)
End Sub
Bookmarks