Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
mel mel is offline
external usenet poster
 
Posts: 6
Default Can I print only specified pages from a print range such as pages 1,3,4,6

Is there a way to print only part of the pages in a print
range. For instance I want to print the travel page for
task2 only if there are travel costs. I know how to check
the value of the travel costs, but is there a way to
leave this sheet out if there are no costs. I'm wondering
if there is a way to get the range reference for each
page and then print only the ones I want. Any suggestions
would be appreciated.
Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default Can I print only specified pages from a print range such as pages 1,3,4,6

Mel,

Worksheets("Name").PrintOut From:=1, To:=1
Worksheets("Name").PrintOut From:=3, To:=3
Worksheets("Name").PrintOut From:=4, To:=4
Worksheets("Name").PrintOut From:=6, To:=6

Obviously, you would want to add logic and looping, along the lines of

For i = 1 To 6
If SomeCondition = True Then
Worksheets("Name").PrintOut From:=i, To:=i
End If
Next i

HTH,
Bernie
MS Excel MVP


"Mel" wrote in message
...
Is there a way to print only part of the pages in a print
range. For instance I want to print the travel page for
task2 only if there are travel costs. I know how to check
the value of the travel costs, but is there a way to
leave this sheet out if there are no costs. I'm wondering
if there is a way to get the range reference for each
page and then print only the ones I want. Any suggestions
would be appreciated.
Thanks



  #3   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Can I print only specified pages from a print range such as pages 1,3,4,6

Thanks a bunch.
-----Original Message-----
Mel,

Worksheets("Name").PrintOut From:=1, To:=1
Worksheets("Name").PrintOut From:=3, To:=3
Worksheets("Name").PrintOut From:=4, To:=4
Worksheets("Name").PrintOut From:=6, To:=6

Obviously, you would want to add logic and looping,

along the lines of

For i = 1 To 6
If SomeCondition = True Then
Worksheets("Name").PrintOut From:=i, To:=i
End If
Next i

HTH,
Bernie
MS Excel MVP


"Mel" wrote in

message
...
Is there a way to print only part of the pages in a

print
range. For instance I want to print the travel page for
task2 only if there are travel costs. I know how to

check
the value of the travel costs, but is there a way to
leave this sheet out if there are no costs. I'm

wondering
if there is a way to get the range reference for each
page and then print only the ones I want. Any

suggestions
would be appreciated.
Thanks



.

Reply
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
Number of pages in worksheet doesn't match Print Preview pages delru Excel Discussion (Misc queries) 2 May 10th 10 10:08 PM
How to print odd pages and even pages seperately in Excel. DILNAVAS Excel Discussion (Misc queries) 1 June 14th 06 11:45 AM
?set up a print range to cover multiple pages in excel JBC Excel Worksheet Functions 3 March 6th 06 03:04 PM
how do I print a range without printing the blank pages? Chris VP Excel Discussion (Misc queries) 2 May 2nd 05 07:08 PM
print range name over multiple pages Mr Mark[_2_] Excel Programming 0 October 7th 04 10:27 PM


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

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

About Us

"It's about Microsoft Excel"