Would you consider it to be retaliation/reflection of your own pickiness if I were to point out that you're missing an EndIf?
Also, your code will throw an error every time, whether it finds a resolution or not.
Also, your code will throw an error every time, whether it finds a resolution or not.