changing label caption by user input

G

Guest

I have a combo box that I have written code to change a labels caption
depending on what the user selects from the combo list. it works right until
the last item in the list is chosen...it doesn't change. This is the code
that I am using

If cmbSavType.Value = "1) Last Year" Then
lblBase.Caption = "Prior:"
ElseIf cmbSavType.Value = "2) Other Levels" Then
lblBase.Caption = "Market:"
ElseIf cmbSavType.Value = "3) Inflation" Then
lblBase.Caption = "Inflated:"
ElseIf cmbSavType.Value = "4) Lowest" Then
lblBase.Caption = "Lowest:"
End If
 
G

Guest

the obvious answer would be that the last item isn't exactly

"4) Lowest"

so it doesn't pass the test and take the action to update the label.

there may be an extra space in there somewhere.
 
G

Guest

that fixed it. thnx1

Tom Ogilvy said:
the obvious answer would be that the last item isn't exactly

"4) Lowest"

so it doesn't pass the test and take the action to update the label.

there may be an extra space in there somewhere.
 

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