Thanks to you both. Roger your code works fine. I'll read thru your comments and revisit the data sheet for a better grasp of it all.