is there a way to have a WAV or MP3 file play upon the opening of a workbook? i'd like to spice up these sheets im sending via email. any ideas?
is there a way to have a WAV or MP3 file play upon the opening of a workbook? i'd like to spice up these sheets im sending via email. any ideas?
Private Declare Function PlaySound Lib "winmm.dll" Alias "PlaySoundA" _
(ByVal lpszName As String, _
hModule As Long, _
ByVal dwFlags As Long) As Long
Private Sub Workbook_Open()
PlayWavFile "C:\Windows\Media\Microsoft Office 2000\Chimes.wav"
End Sub
Public Function PlayWavFile(WavFile As String) As String
Const SND_ASYNC = &H1
Const SND_FILENAME = &H20000
PlaySound WavFile, 0, SND_ASYNC Or SND_FILENAME
PlayWavFile = ""
End Function
'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code
--
HTH
Bob Phillips
"butters14" <butters14.1vqk2a_1127351103.6308@excelforum-nospam.com> wrote
in message news:butters14.1vqk2a_1127351103.6308@excelforum-nospam.com...
>
> is there a way to have a WAV or MP3 file play upon the opening of a
> workbook? i'd like to spice up these sheets im sending via email. any
> ideas?
>
>
> --
> butters14
> ------------------------------------------------------------------------
> butters14's Profile:
http://www.excelforum.com/member.php...o&userid=19890
> View this thread: http://www.excelforum.com/showthread...hreadid=469742
>
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks