Hi there,
Is there way to loop back to the top of the If statement from the Else statement?
I'm validating a string (from InputBox) against dozens of conditions, so I've got code through each valid condition using InStr. If the string doesn't match any, it hits the Else statement, which prompts another InputBox linked to the same string saying "You entered an invalid value, please carefully enter... etc." and then the user can try again to enter a correct value. If this condition is triggered, I want to move through the list of conditions again by going back to the top of the If statement and going through again.
Sample code:
Elsewhere I've seen people using While statements, but since I'm checking against 26 possible values it seems messy to use "While InStr(MyString, "Bird") = 0 Or InStr(MyString, "Dog") = 0 Or....." etc.
Is there an easier way?
Thanks,
Pango
Bookmarks