Hello all,

Here is my current code.

Please Login or Register  to view this content.
The problem that I am having is that it is stopping before the last column. So it will go through and loop to add the columns in the correct places. However it stops prior to going to the last column. I am presuming this is due to the fact that iLastCol is calculating the number of columns prior to the loop, So when it does the loop it is using the original value it got from the column count and not factoring in the new columns added from the loop. Any help on changing the code here would be greatly appreciated.