PlaySound

M

Martin Tudge

Can anyone with programming skills let me know whats wrong
with this module.
I got a compile
error 'expecting =' on the line that reads

sndPlaySound(pFile, SND_SYNC)

Below is the code I pasted....
Option Compare Database
Option Explicit

Declare Function sndPlaySound Lib "winmm.dll"
Alias "sndPlaySoundA" (ByVal lpszSoundName As String,
ByVal uFlags As Long) As Long
Public Const KEY_RETURN = &HD
Public Const SND_SYNC = &H0
Public Const SND_ASYNC = &H1
Public Const SND_NODEFAULT = &H2
Public Const SND_LOOP = &H8
Public Const SND_NOSTOP = &H10

Public Sub PlaySound(pFile As String)

sndPlaySound(pFile, SND_SYNC)
End Sub

Public Sub PlayIntro()
Dim s As String
s = DBEngine(0)(0).Name
While Right$(s, 1) <> "\": s = Left$(s, Len(s) - 1): Wend
s = s & "setup0.wav"
MsgBox "about to play file " & s
PlaySound s

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Calling A Module 5
Assign a sound to a variable 19
Calling a Module 1
Sound repeats unending until closing workbook 2
Wavfile playing trubcated 3
winmm.dll entry points ? 0
playing wma files 2
Alarm 2 2

Top