ok, I've looked at the tip files on this subject and added some code to my VBA, but I'm still getting an error message. Help!
Here is my code:
Private 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
WAVFile = "J:\People\Aimee\dukes_horn - dont erase.wav"
Call PlaySound(WAVFile, 0&, SND_ASYNC Or SND_FILENAME)
MsgBox "You are done! Save now."
End Sub
I'm getting an error message that says "Compile Error: Only comments may appear after End Sub, End Function, or End Property."
Any ideas on what I have done wrong? I just want this one wav file to play when the macro is completed. The wav file is stored in a different folder out on the LAN.
Thanks!
Here is my code:
Private 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
WAVFile = "J:\People\Aimee\dukes_horn - dont erase.wav"
Call PlaySound(WAVFile, 0&, SND_ASYNC Or SND_FILENAME)
MsgBox "You are done! Save now."
End Sub
I'm getting an error message that says "Compile Error: Only comments may appear after End Sub, End Function, or End Property."
Any ideas on what I have done wrong? I just want this one wav file to play when the macro is completed. The wav file is stored in a different folder out on the LAN.
Thanks!