Outlook code select case - TechRepublic
General discussion
September 18, 2002 at 12:54 AM
dennisbv

Outlook code select case

by dennisbv . Updated 23 years, 9 months ago

I am creating a custom form in Outlook and it will need to make a selection based on what is entered into another text box.
Here is a sample of my code, I can get it to work with if statements but I need to be able to use a Select statement.

*’This part will work
If strTest = “E” Then
Item.GetInspector.ModifiedFormPages(“test”).txtClass.Text= “Class One”

If strTest = “D” Then
Item.GetInspector.ModifiedFormPages(“test”).txtClass.Text= “Class Two”
End If
End If

‘this one does not work
Select Case strClassDescription
Case 1
strTest = “E”
Item.GetInspector.ModifiedFormPages(“test”).txtClass.Text= “Class One”

Case 2
strTest = “D”
Item.GetInspector.ModifiedFormPages(“test”).txtClass.Text= “Class One”

How can I get a selct Case to work
Dennis

This discussion is locked

All Comments