I have a Userform with a ListBox, Command Button, and some Textboxes. I want to create a code that when activated will check ListBox5 for string “Far Above”, string “Long Way Below”, and string “Extreme Distance” only.
If one, two, or all three of these strings are the only strings in ListBox5 and no other strings are present, then I would like to call macro “AlternativeOne”. If one, two, or all three of these strings are present in ListBox5 but additional strings are present, then I would like to call macro “AlternativeTwo”. If none of these strings are present but additional strings are present then I would like to also call macro “AlternativeTwo”.
Presently the code works as long as all 3 strings are in ListBox5. However if ListBox5 has only two of these strings or only one of these strings the code does not work. I am looking for help so it works if If one, two, or all three of these strings are present not just all three. Can you help me?
Bookmarks