Thanks Darrel for the rapid answer, indeed my variable wp was a WORD array, sorry i had misreading the manual they says explicitly that the arrays must be a BYTE , change made to BYTE and compiling OK

Leinske