09-07-2015, 03:58 PM
Gintaras thank you as always for your excellent help.
I think I solved the problem.
As my macro is running very fast and opening and closing lots of windows very quickly the variable a.len used in the 3 loops in my code was actually not a constant number and was actually changing during the course of executing the loops in the function and so did not work as intended.
The code only works if a.len is a fixed constant number (i.e. no windows opening and closing) during the execution of the function - I run my macros a bit too quickly!
Problem hopefully solved.
Thank you again.
I think I solved the problem.
As my macro is running very fast and opening and closing lots of windows very quickly the variable a.len used in the 3 loops in my code was actually not a constant number and was actually changing during the course of executing the loops in the function and so did not work as intended.
The code only works if a.len is a fixed constant number (i.e. no windows opening and closing) during the execution of the function - I run my macros a bit too quickly!
Problem hopefully solved.
Thank you again.
