That line of code simply determines the range of cells where the constants will be deleted. The basic format of the range is:
The above refers to range A1:A10. Another piece of code I used was:
This determines the last used cell on the worksheet (similar to typing CTRL + END on a worksheet). I used this to determine the last row to select.
The lastCol + 3 was used because the range to delete the constants is 4 columns (since we copied columns A:D, which is 4 columns). So the range is from row 2, last Col, to the last row, last Col + 3.
For VBA, I highly recommend John Walkenbach's Power Programming with VBA, in combination with reading the various threads on different Excel VBA forums.
Glad I could help you out.
Jason
Bookmarks