Print a preset group of pages
Dave Peterson wrote
If I had noticed that activecell reference, I would have changed this
line:
If HPB.Location.Row ActiveCell.Row Then Exit For
to
If HPB.Location.Row foundcell.Row Then Exit For
Personally, I make enough typing mistakes that I'd want that check
included.
That works, and makes the eye-pleasing difference that focus isn't taken to
activecell during execution. Point taken on including the name check.
Another observation:
VPC isn't even needed. I eliminated VPC = 1 line and changed
NumPage = NumPage + VPC
to
NumPage = NumPage + 1 and nothing broke.
I believe it was included in the original code I "borrowed" and trimmed
that had a check for vertical page breaks which weren't necessary to meet
my needs.
--
David
|