Hi,
I require to send emails from Excel when the colour is red on the last column in the screenshot "Expiry date".
I want the email to be sent automatically to "Tech" which is column 3 in the screenshot if they have a red expiry date.
Any chance this is possible?
Hi,
I'd usually look to do something like this using a Worksheet_Change event but unfortunately changing the colour of a cell does not trigger a change event in Excel. So you'd need to make some other change to the sheet/cell to trigger the VBA.
Once this is done you could then modify the code here to send the email.
In the Tech column is just the letter A, not an email address?
Regards
Phil
Hi,
It should be a email address but for the sake of an example, i just used A.
How about using a change in text to trigger event change?
Im not too good at vba so not sure how i would write it.
Hiya,
Yes, changing a cell value would trigger an event that would then run the VBA to send the email.
In order to do this I'd need to know what cell(s) would change and what value in the cell indicates that an email should be sent?
What will the contents of the email be?
Regards
Phil
The cells changed would be the column Q, the value in the cell i guess should be "expired".
OK so Q currently contains a date - you'll change this so it contains "expired" or some other text?
What will the contents of the email be?
Yep expired, for now the contents can just say "test" i guess.
Hi,
Please see attached.
The code for generating he email is taken from this post : VBA to create email and send with Outlook
Regards
Phil