Not a full reply but:
1. make sure you are using Option Explicit this requires the
declaration of all variables - good programming practice and solves a
host of unintentional errors.
2. use the debug options Add Watch and break if value changes. This
might help
3. Where is the code? eg in a module or in a workbook event?
There are almost always better ways to write code.
Regards
--
tony h
------------------------------------------------------------------------
tony h's Profile:
http://www.excelforum.com/member.php...o&userid=21074
View this thread:
http://www.excelforum.com/showthread...hreadid=544672