Crap! [Frown]

I still think the If...Endif should be faster than IIF.

Keep the If..Endif's and toss the "mod" operator in favor of the "&" bitwise operator. The slowness is probably in the additional math I do.
_________________________
Home page: http://www.kixhelp.com/hb/