hello everyone
I have this code on a command button, but need help with adding a step that offers the user the opportunity to cancel the process either by the hitting escape button or clicking on VB buttons.
What do i need to add or modify?
Sub email()
Dim saddress As String
Subject = "Michael Project Referral"
saddress = InputBox("Please enter the Email address to send email")
Msg = "are you sure?"
Buttons = vbCancel + vbOK + vbYes ActiveWorkbook.SendMail Recipients:=saddress, Subject:=Subject, ReturnReceipt:=False
Cancel = True
MsgBox "Your email has been sent to the Project Manager for actioning" & vbCr & saddress & vbCr & "", , "MESSAGE"
End Sub
Thanks very much
I have this code on a command button, but need help with adding a step that offers the user the opportunity to cancel the process either by the hitting escape button or clicking on VB buttons.
What do i need to add or modify?
Sub email()
Dim saddress As String
Subject = "Michael Project Referral"
saddress = InputBox("Please enter the Email address to send email")
Msg = "are you sure?"
Buttons = vbCancel + vbOK + vbYes ActiveWorkbook.SendMail Recipients:=saddress, Subject:=Subject, ReturnReceipt:=False
Cancel = True
MsgBox "Your email has been sent to the Project Manager for actioning" & vbCr & saddress & vbCr & "", , "MESSAGE"
End Sub
Thanks very much