e-mail Notification of a Change in an Excel document


Posted by Craig on December 28, 2001 1:57 PM

I currently have an Excel document on a server with shortcuts on four client computers. I would like to have the software automatically send an e-mail notification message and a shortcut link to all four client computers if someone adds, changes, or modifies any data in the workbook on the server. It seems like something that can be done in code so I tried to write a couple lines in VB but quickly found out that my knowledge with Excel's methods/events is very limited. Can anyone help me out?



Posted by Mike on December 30, 2001 9:49 AM

You could try something like this:

'(General) (Declarations) section of workbook
Public changed As Boolean

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)

If changed Then
'Email everyone here
End If

End Sub

Private Sub Workbook_Open()

changed = False

End Sub

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)

changed = True

End Sub

-Mike