View Single Post
  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

Steve,

Put this code in a normal code module

Private Declare Function PlaySound Lib "winmm.dll" Alias "PlaySoundA" _
(ByVal lpszName As String, _
hModule As Long, _
ByVal dwFlags As Long) As Long


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


and then in ThisWorkbook add this code



Private Sub Workbook_Open()

PlayWavFile ("C:\Windows\Media\Microsoft Office 2000\Chimes.wav")End Sub
--

HTH

RP
(remove nothere from the email address if mailing direct)


"SteBar" wrote in message
...
Is it possible that when I open up a particular Excel file a particular
wav/midi/mp3 music file will automatically start playing? If so, how do I
do it?

Thanks - Steve B.