View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default audio alert when a shared workbook is saved by any user

If the user doesn't enable macros (or opens the workbook file while holding
the SHIFT key), the code won't run. Unfortunately, there is no other way to
do it.


--
Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)




"Bob W" wrote in message
...
Is that going to trigger a macro warning every time anybody opens the
shared
workbook? That won't fly...people will just bypass the macro (if excel is
like Word).

"Chip Pearson" wrote:

Try something like the following code in the ThisWorkbook code module. It
must go in the ThisWorkbook module, not a regular code module. Change
"Chimes" to the name of the sound you want to play.


Private Declare Function sndPlaySound Lib "winmm.dll" Alias
"sndPlaySoundA"
( _
ByVal lpszSoundName As String, _
ByVal uFlags As Long) As Long

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
sndPlaySound "Chimes", 0
End Sub


--
Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)



"Bob W" wrote in message
...
I'd like our shared team spreadsheet to issue a little audio alert each
time
someone saves the spreadsheet (thereby updating all users). Can this
be
done?