Sorry been away for a bit. Just add and else (not elseif) to the end of the if statement and either say exit sub or goto programexit

That should sort it for you.