Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22
Default audio alert when a shared workbook is saved by any user

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?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7,247
Default audio alert when a shared workbook is saved by any user

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?


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22
Default audio alert when a shared workbook is saved by any user

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?


  #4   Report Post  
Posted to microsoft.public.excel.misc
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?



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22
Default audio alert when a shared workbook is saved by any user

Chip, thanks for the macro; i guess we will have to get our team together and
tell them to enable macros....

"Chip Pearson" wrote:

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?


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Shared Workbook creating Backup when saved? LG Excel Discussion (Misc queries) 1 July 21st 08 10:58 PM
Remember last saved for shared workbook David P. Excel Discussion (Misc queries) 0 March 29th 07 06:08 PM
How do I add an alert message upon a user closing the workbook? ehoskins Excel Discussion (Misc queries) 1 July 12th 06 10:48 PM
Phantom documents saved from shared workbook natalie st ange Excel Worksheet Functions 0 May 17th 06 05:10 PM
Can I set an audio alert that triggers as Excel cell value chgs? SellUnHi Excel Discussion (Misc queries) 3 June 9th 05 07:30 PM


All times are GMT +1. The time now is 01:15 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"