I have some code that seems to behave as expected and occasionally satisfies an if loop i've created but the code never seems to enter the loop. Even where the if statement is satisfied. Any help would be appreciated. The 'Warning' Messages a just to trigger a different font effect in the display box as the tool runs. The if statement at line 21 in the attached file is the issue, though as I've said it triggers no errors.