playing a wavefile via VBA
Posted by Jason Davis on November 01, 2001 10:36 AM
OK, here we go again...
I am trying to get a wave file to play based on a
value in a cell falling below 31.
Here is what I did (which isn't working)
Declare Function Playsound lib "winmm.dll" _
alias "playsounda" (byval lpszname as string, _
byval hmodule as long, byval dwflags as long) as long
CONST SND_SYNC = &H0
CONST SND_ASYNC = &H1
CONST SND_FILENAME = &H20000
IF WORKSHEETS("514").RANGE("F53") < "31" THEN
WAVFILE = "5VOLT.WAV"
WAVFILE = THISWORKBOOK.PATH & "\" WAVEFILE
CALL PLAYSOUND(WAVFILE. 0&. SND_ASYNC OR SND_FILENAME)
I KEEP GETTING AN ERROR MESSAGE OF
"CANT FIND DLL ENTRY POINT PLAYSOUNDA IN WINMM.DLL"
ANY IDEA WHAT THE PROBLEM IS????