Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Stop Excel from combining continuous PrintArea

Status
Not open for further replies.

jpgactmod

Technical User
Feb 12, 2004
41
0
0
US
I have a worksheet with several continuous areas that I would like to print on separate pages. For example, two adjacent print areas are as follows:

CR6:CU77, CV26:DM77

When I use VBA to enter the above into Page Layout/PrintArea, Excel combines the PrintArea to CR6:DM77. Is there a way I can stop Excel from combining these adjacent print areas?

Thank you for any help.

Jim
 
Have a look at the VPageBreaks collection.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 


hi

Try setting the print area for each in a loop
[tt]
'CR6:CU77, CV26:DM77
dim sRng(1) as string, i as integer
sRng(0) = "CR6:CU77"
sRng(0) = "CV26:DM77"

for i = 0 to ubound(sRng)
activesheet.PageSetup.printarea = sRng(i)
activesheet.print
next
[/tt]


Skip,
[sup][glasses]Don't let the Diatribe...
talk you to death![tongue][/sup][sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 



sorry Printout

Skip,
[sup][glasses]Don't let the Diatribe...
talk you to death![tongue][/sup][sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
I see. I assume that the second sRng(0) is meant to be sRng(1). Instead of setting the PrintArea, the VBA code prints each area one at a time. Correct? Yes, this works fine.

Thank you again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top