snowboy001
Board Regular
- Joined
- Dec 5, 2009
- Messages
- 100
I have some macro's that are tracking changes on each sheet in my workbook. If there are changes detected, it puts a "1" in cell A1 of a hidden sheet (named "Sheet1" for this demonstration). I am wanting to run a BeforeSave event to check for that "1", and if it is there, send an email out to my group to notify them.
Here is what I am thinking...
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, _
Cancel As Boolean)
'run macros to update changes, and put a "1" in cell A1 of the hidden sheet
If Sheets("Sheet1").Range("A1").Value = "1" Then
'code to send out email to my group (I already have this code)
End If
End Sub
The part in red is what I am having trouble with.
Here is what I am thinking...
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, _
Cancel As Boolean)
'run macros to update changes, and put a "1" in cell A1 of the hidden sheet
If Sheets("Sheet1").Range("A1").Value = "1" Then
'code to send out email to my group (I already have this code)
End If
End Sub
The part in red is what I am having trouble with.