Skip email message with no email address

Ian McPherson

New Member
Joined
Feb 20, 2018
Messages
21
Office Version
  1. 365
Platform
  1. Windows
I am using this VBA code (downloaded from internet) to display email messages prior to sending. I am not that familiar with VBA so would like additional code that would skip emails with a blank or no address.
Thanking you in advance.

Skip Blank Email Addresses-1.jpg
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Maybe wrap the With / End With in an If block, as in
If R.Offset(0,1) <> "" Then

If the range has no value it should not send the email. Exception could be that the range contains one or more space characters, or something that is not "" but is not a valid email recipient either. In that case, better validation may be required.

Please post code within vba code tags (use vba button on posting toolbar). Pics of code are not very helpful.
 
Upvote 0

Forum statistics

Threads
1,221,310
Messages
6,159,176
Members
451,543
Latest member
cesymcox

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