Re: email on condition from "import external data"




Steve, Thanks for replying.

Actually I just used the example from
http://www.rondebruin.nl/mail/change.htm

The work*** module looks as follows

Private Sub Worksheet_Change(ByVal Target As Range)
Dim rng As Range
If Target.Cells.Count > 1 Then Exit Sub
On Error GoTo EndMacro
If Not Target.HasFormula Then
Set rng = Target.Dependents
If Not Intersect(Range("c1"), rng) Is Nothing Then
If Range("c1").Value > 0 Then Sendmail
End If
End If
EndMacro:
End Sub

I do have a test workbook (workbook 1) with a work*** setup with the
above. C1 changes depending on data imported into A2 and A3 from an
another workbook (workbook 2). C1 is a formula
(=IF(AND(A2>=40,A3<=40),1,-1))

If I change the data in (workbook 2) to make C1=1 in (workbook 1), I
get no email. :mad:

If I manually change A2 and A3 in my work*** in (workbook 1) to make
C1 =1 I get email. :)

I agree that it must be in work*** module script, I just don't have a
clue what is wrong with the script, or how it even knows or cares that
A2 and A3 have been changed manually or by imported data.


--
CAP
------------------------------------------------------------------------
CAP's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=27720
View this thread: http://www.excelforum.com/showthread.php?threadid=472351

.


Loading