$ 0 0 What do you mean by any message?? In last of the code you can write this as If GETLASTERORTEXT <> '' THEN Variable := GETLASTERORTEXT