Sorry in advance, would have used search but has been disabled SO here is a question which has been asked a million times previously....our internal archive server is down so cannot log in to extract the code.........................

Playing wav files.

Am using

Code:
Const SND_SYNC = &H0
Const SND_NODEFAULT = &H2

Call sndPlaySound(sWavFile, SND_SYNC Or SND_NODEFAULT)
In a public sub.

Get the following error

"Sub or FUnction not defined"

Do l have to do the declare in the same bas module?