Auto email when cell a1=1

Stevie p

Board Regular
Joined
Mar 8, 2009
Messages
228
Hi,
Im looking for a macro or vba to auto email me when cell A1=1.
Can anyone help. i've only have very basic knowlage of vba.
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
what method do you want to use to send email?
this is a basic method using cdo, which will work as is from many xpand some vista computers
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("a1")) Is Nothing And Range("a1") = 1 Then
    cdo = CreateObject("cdo.message")
    cdo.to = "someone@some.com"
    cdo.from = "me@myhost.com"
    cdo.Subject = "cdo test"
    cdo.textbody = "this is the content " & Range("b17").Value
    cdo.send
End If
End Sub
for computers with no registered email client, you may need to set all the configuration properties, also it you want to use a gmail or similar account, again you will need to set the configuration properties
 
Upvote 0
I have outlook and windows xp, i would be sending through smtp. I really have no knowledge at all of setting configurations and any help would be very appreciated
 
Upvote 0

Forum statistics

Threads
1,213,557
Messages
6,114,291
Members
448,564
Latest member
ED38

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top