C
chalky
I have the following code to play a WAV file in excel:
Sub PlayWavFile(WavFileName As String, Wait As Boolean)
If Dir(WavFileName) = "" Then Exit Sub ' no file to play
If Wait Then ' play sound before running any more code
sndPlaySound WavFileName, 0
Else ' play sound while code is running
sndPlaySound WavFileName, 1
End If
End Sub
where the file name is c:\accounts\05\temp\sound.wmv
I am really struggling to put this macro together, can anyone lay it
out in a slightly easier to follow format?
Thanks
chris
Sub PlayWavFile(WavFileName As String, Wait As Boolean)
If Dir(WavFileName) = "" Then Exit Sub ' no file to play
If Wait Then ' play sound before running any more code
sndPlaySound WavFileName, 0
Else ' play sound while code is running
sndPlaySound WavFileName, 1
End If
End Sub
where the file name is c:\accounts\05\temp\sound.wmv
I am really struggling to put this macro together, can anyone lay it
out in a slightly easier to follow format?
Thanks
chris