Nico Learning
New Member
- Joined
- May 15, 2009
- Messages
- 20
Hi All,
Can someone please help me with this code i have a code that works perfectly, it sends the email fine, however i cannot work out how to modify it to send the email only if the cell is updated please see code below, it would be perfect if i could get it to send in when the spread sheet is closed But only if row "B" is updated
The current code works when the spread sheet is closed but i only want it to send when its been updated, please see below.
Thank you
Can someone please help me with this code i have a code that works perfectly, it sends the email fine, however i cannot work out how to modify it to send the email only if the cell is updated please see code below, it would be perfect if i could get it to send in when the spread sheet is closed But only if row "B" is updated
The current code works when the spread sheet is closed but i only want it to send when its been updated, please see below.
PHP:
Private Sub auto_close()
sendemail
End Sub
Public Function sendemail()
On Error GoTo ende
esubject = "New Coaching Required"
sendto = "nicholas.walker@npower.com"
ccto = ""
ebody = "Please see update on the coaching template"
Set app = CreateObject("Outlook.Application")
Set itm = app.createitem(0)
With itm
.Subject = esubject
.to = sendto
.cc = ccto
.body = ebody
.send
Set app = Nothing
Set itm = Nothing
End With
ende:
End Function
Thank you