Hi,
The below code (which was given in this NG + With some minor alterations by
me) intends to check if anything is changed on column J then email that
changed info to a spesific email address without the notice of the workbook
user...
But it has two problems:
1. If Outlook Express is not opened beforehand, starting of OE is visible
and the user recognizes that something without his/her control is going on.
2. If Outlook Express is active before the execution of the macro, yet again
a small instance of mail being produced is visible on the screen.
Can anyone suggest solutions for the 2 problems?
Thanks
'------------------------------------
Dim oldvalue As Variant
Private Sub Worksheet_Change(ByVal Target As Range)
Application.DisplayAlerts=False
If Target.Column = 10 Then
Recipient = "(e-mail address removed)"
Subj = Target(1, -6) & " -- written " & oldvalue & " -- " & Target.Value &
""
msg = "Hey... workbook's been changed"
HLink = "mailto:" & Recipient & "?"
HLink = HLink & "subject=" & Subj & "&"
HLink = HLink & "body=" & msg
ActiveWorkbook.FollowHyperlink (HLink)
Application.Wait (Now + TimeValue("0:00:01"))
SendKeys "%s", True
End If
Application.DisplayAlerts=True
End Sub
Private Sub worksheet_SelectionChange(ByVal Target As Range)
oldvalue = Target.Value
End Sub