I have a piece of code which is pulling a value from an SQL table and assigning it to a variable called MVID. I also have a listbox called lstAxis which has multiple select set on. The 1st item in the listbox is "ALL" and after that it is populated with data which has a numeric value for each item's .itemdata.
What I need to do is run some code if the MVID variable matches EXACTLY a seleted item's .itemdata value or the ALL item.
I have looked at instr but that seems to throw up false negatives for instance if MVID = 2 then the code runs if the item's .itemdata is 2 or 222 or 123 etc.
Thanks in advance for your help