I have managed to add music to a splash screen I created.
I want the music to stop when the splash screen closes but this does not happen.
The following is the code for the play sound function ............
Option Compare Database
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: the fu11 path and file name.
If apisndPlaySound(sWavFile, 1) = 0 Then
MsgBox "The Sound Did Not Play!"
The following is the procedure that plays the sound when the splash screen opens ........
Private Sub Form_Open(Cancel As Integer)
Is there a way to stop the sound from playing in the code of the 'On Close property?
Private Sub Form_Close()