Make Dropdown Menu Selection Mandatory

R

Rookie

Hi,

I have a custom Outlook 2003 form created with a drop down menu used to
categorize emails. How can I make choosing a selection from the drop down
menu mandatory? This will be useful to ensure all messages have a category
(ie Accounting, Legal, Medical, etc).
Here is the code I am using:

Function Item_Send()
Dim NewText, BodyText
NewText = ""
BodyText = Item.Body
MyStatement = Item.UserProperties("Statement")
Select Case MyStatement
Case "Accounting"
NewText = "*** Message Includes ACCOUNTING Information ***"
Case "Legal"
NewText = "*** Message Includes LEGAL Information ***"
Case "Medical"
NewText = "*** Message Includes MEDICAL Information ***"
End Select
Item.Body = NewText & chr(13) & BodyText & chr(13) & chr(13) & NewText
End Function
 
S

Sue Mosher [MVP-Outlook]

The easiest way is to bind the control to an Outlook property and then set up a validation formua and text on the Validation tab of the control's Properties dialog.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
R

Rookie

Your verbage is way out of my league. I instead found the Validation option
to ensure that a value is required for the field in question. Also, I added
this to the end of my "Select" statement:

Case Else
MsgBox "Unknown Value, Please Select from the Drop Down List"
Item_Send = False
Exit Function

Thanks anyway.
 
S

Sue Mosher [MVP-Outlook]

Ah, the belt and suspenders approach.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top