You're quite correct, Igor. I have searched high and low for my earlier code, but I cannot find it, nor can I reproduce the earlier error. I suspect I did something stupid in the original code and misinterpreted the nature of the problem. In any case, the most recent demo seems to work. Thanks for you input. I apologize if I wasted your time.