Tony
Jim is correct if you declared your variables in your macros as you
have in your posted code
Dim i, j, k, l As Integer
It is only the last variable that is declared as a Integer
You need to use
Dim i as Integer
Dim J as Integer
Dim K as Integer
If you modify your declartions as above in all your macros
You can turn on the Option Explicit for all new workbooks & modules by
going to Tools Options Editor Tab Require Variable Declaration
or having the very 1st entry on your modules as
Option Explicit
Using this option saves a lot debugging problems
--
mudraker
------------------------------------------------------------------------
mudraker's Profile:
http://www.excelforum.com/member.php...fo&userid=2473
View this thread:
http://www.excelforum.com/showthread...hreadid=535794