I created a new module (below) to play sound (Gorilla Breaths) when a form is open. Code works but plays a chime sound instead of selected wave file. I am a novice at writing code. What am I not doing or missing for the sound not to play? Any help would be appreciated.
Declare Function apisndPlaySound Lib "winmm" Alias "sndPlaySoundA" _
(ByVal filename As String, ByVal snd_async As Long) As Long
Function PlaySound(sWavFile As String)
' Purpose: Plays a sound.
' Argument: "W:\\CFFSRV004\ISGROUPS\!_ITAdministration\Admin\J UNIOR\Gorilla.wav".
If apisndPlaySound(sWavFile, 1) = 0 Then
MsgBox "The Sound Did Not Play!"
End If
End Function
Private Sub Form_Open(Cancel As Integer)
PlaySound ("W:\\CFFSRV004\ISGROUPS\!_ITAdministration\Admin\ JUNIOR\Gorilla.wav")
End Sub