Thanks for your help (and also the advice on delcaring all variables)!

Works great.