My code is:
The problem I am experiencing is when the program reaches the while loop. The conditions And (ActiveCell.Column) < e and (ActiveCell.Column) >= e Are mis-triggering it is as if the conditions is not evaluated at all or (ActiveCell.Column) >= e is all ways true which it is not).![]()
Please Login or Register to view this content.
Originally I wrote the code from the while loop down. The code as shown worked. After I was requested that the code/ability include the capability to copy an entire sheet from another workbook to the workbook where the macro is hosted, the top part of the code was added.
The problem I think arises since the code is set to run on the 2nd sheet the 17th column, Q, is not 17 as assumed. Is there a way to:
1 to alter the syntax of (ActiveCell.Column) < e So it knows I am trying to refer to 17th column on the second/last/active sheet?
2 Or make it so the value of e always refers to 17th column on the current sheet?
thanks
lconner
Bookmarks