LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #8   Report Post  
Posted to microsoft.public.excel.misc
David
 
Posts: n/a
Default 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
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Print 1st Page Multiple Sheets in Same Workbook Ben Dummar Excel Discussion (Misc queries) 8 May 22nd 07 09:18 PM
How can I get the 1st 2 rows on my document to print on all pages j_a_barr Excel Discussion (Misc queries) 1 February 24th 06 01:39 PM
Print pages in a different order dlb1228 Excel Discussion (Misc queries) 2 February 23rd 06 09:31 PM
Print Odd/ Even or specified pages in excel at a time. NAVEEN Excel Discussion (Misc queries) 1 February 21st 06 11:07 AM
Print several worksheets at once with fewer pages Stephen POWELL Excel Discussion (Misc queries) 6 January 25th 05 02:21 PM


All times are GMT +1. The time now is 09:15 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"