Thanks for that Paul. I have ditched the declaring of variables. It has knocked a couple of seconds of the excution time of the logon script.

I'll monitor to see if that resolves the problem of having this irritating error message coming up at regular intervals. Once again many thanks.