Quote Originally Posted by georgiboy View Post
Have you tried to dim z1 as a variant instead of a double in the same code?
I've tried option explicit, variant, double and various combinations. The result is the same Runtime error 6 at the end of the z1 loop.