EMAIL IF....

  • Thread starter Thread starter Wayne
  • Start date Start date
W

Wayne

Using MS Excel 97 with MS XP os


If a cells contents are of a greater value than say 1,000
is it possible for the excel workbook to be emailed upon
saving of the workbook without the person being aware ?

Is there any links to information on this subject???

Thanks in advance.

Wayne
 
This code works in Excel 2000, MS XP. Test before you try it. Also if you
have Virus protection it may cause a warning.

Charles

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, _
Cancel As Boolean)
ActiveWorkbook.HasRoutingSlip = True
With ActiveWorkbook.RoutingSlip
If Sheets("Sheet1").Range("A1") > 1000 Then
.Delivery = xlOneAfterAnother
.Subject = "Hello"
.Message = "TEST"
.Recipients = "Your E-Mail Address"
.ReturnWhenDone = False
ActiveWorkbook.Route
End If
End With
End Sub
 
That sounds good but will work only if you put it wihtin the workbook sheet
code.
Not in a separate module.

Correct me if I am wrong.

Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top