hotmailliw
New Member
- Joined
- Mar 18, 2013
- Messages
- 14
Hi
I am trying to come up with a code in excel vba that will prompt use to double check the subject when "Send"
is clicked.
The code i have below is for Outlook vba and will only prompt when the Subject is empty
Is it possible to edit the below so that i can use it in excel and have it to prompt when "Send" is clicked. Thank you
<code style="font-family: Courier, monospace; margin: 0px; padding: 0px; width: auto; zoom: 1; white-space: pre-wrap;">Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean) If Item.Subject = "" Then 'Edit the message and the popup caption on the next line as desired.' msgbox "You are not allowed to send an item with a blank subject. Please enter a subject and send again.", vbCritical + vbOKOnly, "Prevent Blank Subjects" Cancel = True End IfEnd Sub</code></pre>
I am trying to come up with a code in excel vba that will prompt use to double check the subject when "Send"
is clicked.
The code i have below is for Outlook vba and will only prompt when the Subject is empty
Is it possible to edit the below so that i can use it in excel and have it to prompt when "Send" is clicked. Thank you
<code style="font-family: Courier, monospace; margin: 0px; padding: 0px; width: auto; zoom: 1; white-space: pre-wrap;">Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean) If Item.Subject = "" Then 'Edit the message and the popup caption on the next line as desired.' msgbox "You are not allowed to send an item with a blank subject. Please enter a subject and send again.", vbCritical + vbOKOnly, "Prevent Blank Subjects" Cancel = True End IfEnd Sub</code></pre>