J
John Pierce
I use sound files in VBA using a line like:
PlayWav ("C:\Sounds\bounce.way")
which requires access to a function and macro which follow:
---------------------------------------------------------------
Public Declare Function sndPlaySoundA Lib "winmm.dll" _
(ByVal lpszSoundName As String, ByVal uFlags As Long) As Long
---------------------------------------------------------------
Public Sub PlayWav(WavFile As String)
'
sndPlaySoundA WavFile, 1
'
End Sub
----------------------------------------------------------------
Up to now I have put these in each file using wave files but I
should be able to have the function and macro in Personal.xls but
that isn't working for me because apparently the other workbooks
are not referencing Personal.xls. I thought that if Personal.xls
was open it was accessible to any other open workbook. What gives?
PlayWav ("C:\Sounds\bounce.way")
which requires access to a function and macro which follow:
---------------------------------------------------------------
Public Declare Function sndPlaySoundA Lib "winmm.dll" _
(ByVal lpszSoundName As String, ByVal uFlags As Long) As Long
---------------------------------------------------------------
Public Sub PlayWav(WavFile As String)
'
sndPlaySoundA WavFile, 1
'
End Sub
----------------------------------------------------------------
Up to now I have put these in each file using wave files but I
should be able to have the function and macro in Personal.xls but
that isn't working for me because apparently the other workbooks
are not referencing Personal.xls. I thought that if Personal.xls
was open it was accessible to any other open workbook. What gives?