MsgBox before sending email
Posted on 2010-08-16
Currently, I have a button where once it clicked, it will automatically send an email without opening the outlook. Some of the information will be extract from the form such as customer email, name and etc.
Below is part of my code:
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
On Error Resume Next
.to = Me.Email
.CC = ""
What I am trying to do now is, to set up a MsgBox when any of the data is not entered, such as if the email or customer name has blank records, then a MsgBox will appear.