Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Writing a Procedure to print non-contagious area on the smae page

I want to write a procedure to print non-contagious print areas on the same
page. For example, I want to print range A1:I8 and range A58:I66 on the
same page.

I tried the following
......
Sheets("Sheet1").Select
Union(Range("A4:I8"), Range("A58:I66")).Select
Selection.PrintOut Copies:=1, Collate:=True

but the two ranges are printed on two pages.


Regards


Basharat.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 42
Default Writing a Procedure to print non-contagious area on the smaepage

Hi
I think your best solution here is to copy the ranges to another
worksheet first and then print that sheet. Something like this:


Sub PrintRanges()
Set Sh1 = Sheets(1)
Set Shp = Sheets("PrRanges") 'Printout sheet
Shp.Range("A4:U66") = "" 'Clear area first
Shp.Range("A4:I8") = Sh1.Range("A4:I8").Value 'copy 1st range
Shp.Range("K4:S12") = Sh1.Range("A58:I66").Value 'copy 2nd range
Shp.PrintOut From:=1, To:=1, copies:=1
End Sub

Shp.Range("K4:S12") could be Shp.Range("A10:I18"), depends where you
want the second range to be in relation to the first range.


HTH

Andrew Bourke

Basharat A. Javaid wrote:
I want to write a procedure to print non-contagious print areas on the same
page. For example, I want to print range A1:I8 and range A58:I66 on the
same page.

I tried the following
.....
Sheets("Sheet1").Select
Union(Range("A4:I8"), Range("A58:I66")).Select
Selection.PrintOut Copies:=1, Collate:=True

but the two ranges are printed on two pages.


Regards


Basharat.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Writing a Procedure to print non-contagious area on the smae page

Sheets("Sheet1").Select
Range("A9:A57").EntireRow.Hidden = True
Range("A4:I66")).PrintOut Copies:=1, Collate:=True
Range("A9:A57").EntireRow.Hidden = False

--
Regards,
Tom Ogilvy


"Basharat A. Javaid" wrote in message
...
I want to write a procedure to print non-contagious print areas on the

same
page. For example, I want to print range A1:I8 and range A58:I66 on the
same page.

I tried the following
.....
Sheets("Sheet1").Select
Union(Range("A4:I8"), Range("A58:I66")).Select
Selection.PrintOut Copies:=1, Collate:=True

but the two ranges are printed on two pages.


Regards


Basharat.




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
Split Print Area: How to make it print to one page Kirk Bubul[_2_] Excel Discussion (Misc queries) 3 September 29th 11 04:06 PM
Setting the print area in page set up to print 1 page wide by 2 pages tall EA[_2_] Excel Discussion (Misc queries) 2 July 12th 07 08:39 PM
Print Area. 1st page Landscape 2nd page Portrait?? Corey Excel Worksheet Functions 1 June 23rd 06 08:18 AM
Active cell counting in particular print page (one sheet having different print area) ananthmca2004 Excel Worksheet Functions 1 November 24th 05 11:29 AM
How do you turn off a print area for a page? (no print area) Grunen Excel Discussion (Misc queries) 4 October 8th 05 07:46 PM


All times are GMT +1. The time now is 05:31 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"