Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
help Compare string to Combo box!!!
How would you compare a variable to see if it was in a combobox??
I was Thinking maybe If Variable = CboBox.Text but wouldnt that only compare it to the one selected? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
help Compare string to Combo box!!!
Try something like this:
Dim cnt as long For cnt = 0 to CboBox.ListCount - 1 If Variable = CboBox.List(cnt) then 'Do Something Else 'Do Something Else End If Next -- Charles Chickering "A good example is twice the value of good advice." " wrote: How would you compare a variable to see if it was in a combobox?? I was Thinking maybe If Variable = CboBox.Text but wouldnt that only compare it to the one selected? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
compare string | Excel Worksheet Functions | |||
Compare string with integer | Excel Programming | |||
String compare doesn't compare? | Excel Programming | |||
Compare between String and Value using VBA | Excel Programming | |||
string compare with wildcards | Excel Programming |