Wow, thanks Paul and Mat; that was fast! Exactly what I needed...I couldn't find the ~ negator in the manual, and I wasn't sure if logical true and false could be automatically typecast to a byte variable. From your code, now I know, and I have a bunch of things to try to see which minimizes the generated code.

Thanks,

- Jim