juster21
Well-known Member
- Joined
- Jun 3, 2005
- Messages
- 867
I am trying to use a "Select...Case" statement but am missing something.
There is a combo box that the user will choose either Medium, High, or Urgent. Below is my code:
I get a "Case without Select Case" compile error. What am I doing wrong?
Thanks!!!!!
There is a combo box that the user will choose either Medium, High, or Urgent. Below is my code:
Code:
Private Sub cboPriorityLevel_Change()
Select Case True
Case "Urgent"
If cboPriorityLevel.Value = "Urgent" Then
cboPriorityLevel.BackColor = vbRed
Case "High"
If cboPriorityLevel.Value = "High" Then
cboPriorityLevel.BackColor = vbOrange
Case "Medium"
If cboPriorityLevel.Value = "Medium" Then
cboPriorityLevel.BackColor = vbBlue
End Select
End Sub
I get a "Case without Select Case" compile error. What am I doing wrong?
Thanks!!!!!