Hi Ron,Originally Posted by Ron Coderre
I'm amazed at your skill in writing tight code! I'm quite weak at vba in general and have a need to perform a routine for which I'm able to code, but I need to apply it only to the active sheet.
I've studied the code you gave BigBas. If I understand it, lngEndRow (what's lng?) is the last row of the active sheet and lngCtr is a counter that starts at the last row and goes through row three (I presume the first two rows are header). What I'm quite murky about is the if statement and the following one. I don't understand what the "3" is in either one of them.
Btw, the routine I'm working on is to sort a sheet of a couple hundred lines after first removing all hard page breaks and then inserting them back in the new sort where they belong at the beginning of each of a dozen or two groups.
Thanks for sharing your expertise!
Bookmarks