Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB / Excell worksheet change!

Status
Not open for further replies.

HeyFrantz

Technical User
Jul 18, 2002
15
US
Geff and all!
How do you check if a workbook has been changed/updated.
I am writing a procedure, but it's based on whether the workbook has been changed or not....I just can not seem to get that if condition statement right...any idea!
thanx
 
You could use the Saved property, which his set to false if any change occurs in the workbook - e.g. :-
Code:
If ActiveWorkbook.Saved then
    MsgBox "No Change"
Else
    MsgBox "workbook changed"
End if
A.C.
 
that did not work: here is what I am working with:

Private Sub Workbook_BeforeClose(Cancel As Boolean)
If ActiveWorkbook.Saved = True Then
With ThisWorkbook
.HasRoutingSlip = True
With .RoutingSlip
.Delivery = xlOneAfterAnother
.Recipients = Array("heyFrantz@yahoo.com")
.Subject = "Updated Employee Workbook"
.Message = "The Employee workbook has been modified. Attached is a revised copy, Thanks!"
.ReturnWhenDone = False


End With
.Route
End With
End If
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top