Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default How to avoid several print areas being squeezed into one page

In a reporting application I am building a single sheet with many different
print areas as a report. However, when I choose printout all of the areas
are presented on a single with the zoom factor set very low (like 5%).

I cannot find a way to make this behaviour stop. Is it a general setting or
is it something I can control through the code.

It should be mentionened that my spreadsheet is embedded as an OLE object in
a VB form. Thus I do not have access to the full object model of Excel but
only the single sheet in the workbook:

Dim shPrint As Object ' extra ref to the Worksheet object in the OLE
object container that we will work with
Dim sPrtAreaAdr As String

Set shPrint = OLE_keyfig(5).object.Sheets(1)

shPrint.Range("A202:J1200").Value = ""

' Setting a range to to a prepared array
shPrint.Range("A201:J" & CStr(201 + UBound(arrKortXL, 1))).Value =
arrKortXL

Dim iKort As Integer

' This is an effort to stop display in one page by defining separate
print area entries in the range string
Do While iKort < UBound(arrKortXL, 1):
sPrtAreaAdr = sPrtAreaAdr & ",A" & CStr(200 + iKort) & ":J" &
CStr(200 + iKort + 79)
iKort = iKort + 80
Loop

shPrint.PageSetup.PrintArea = sPrtAreaAdr
shPrint.PrintOut Preview:=True

The above still produces one printout page in the preview with the zoom set
to a very low figure. I want a new page per 80 lines. I could define each 80
lines separately and printout right away before defining the next, but then
my footer with page number and total number of pages won't make any sense.

Hope that someone can help.


With kind regards,




Frank M.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default How to avoid several print areas being squeezed into one page

Frank,
On the print setup dialog, do you have the Scaling Fit To option selected.

NickHK

"Frank M." wrote in message
...
In a reporting application I am building a single sheet with many

different
print areas as a report. However, when I choose printout all of the areas
are presented on a single with the zoom factor set very low (like 5%).

I cannot find a way to make this behaviour stop. Is it a general setting

or
is it something I can control through the code.

It should be mentionened that my spreadsheet is embedded as an OLE object

in
a VB form. Thus I do not have access to the full object model of Excel but
only the single sheet in the workbook:

Dim shPrint As Object ' extra ref to the Worksheet object in the OLE
object container that we will work with
Dim sPrtAreaAdr As String

Set shPrint = OLE_keyfig(5).object.Sheets(1)

shPrint.Range("A202:J1200").Value = ""

' Setting a range to to a prepared array
shPrint.Range("A201:J" & CStr(201 + UBound(arrKortXL, 1))).Value =
arrKortXL

Dim iKort As Integer

' This is an effort to stop display in one page by defining separate
print area entries in the range string
Do While iKort < UBound(arrKortXL, 1):
sPrtAreaAdr = sPrtAreaAdr & ",A" & CStr(200 + iKort) & ":J" &
CStr(200 + iKort + 79)
iKort = iKort + 80
Loop

shPrint.PageSetup.PrintArea = sPrtAreaAdr
shPrint.PrintOut Preview:=True

The above still produces one printout page in the preview with the zoom

set
to a very low figure. I want a new page per 80 lines. I could define each

80
lines separately and printout right away before defining the next, but

then
my footer with page number and total number of pages won't make any sense.

Hope that someone can help.


With kind regards,




Frank M.




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default How to avoid several print areas being squeezed into one page

Right that was what I was looking for. Thanks for the help

Frank M.


"NickHK" wrote in message
...
Frank,
On the print setup dialog, do you have the Scaling Fit To option

selected.

NickHK

"Frank M." wrote in message
...
In a reporting application I am building a single sheet with many

different
print areas as a report. However, when I choose printout all of the

areas
are presented on a single with the zoom factor set very low (like 5%).

I cannot find a way to make this behaviour stop. Is it a general setting

or
is it something I can control through the code.

It should be mentionened that my spreadsheet is embedded as an OLE

object
in
a VB form. Thus I do not have access to the full object model of Excel

but
only the single sheet in the workbook:

Dim shPrint As Object ' extra ref to the Worksheet object in the OLE
object container that we will work with
Dim sPrtAreaAdr As String

Set shPrint = OLE_keyfig(5).object.Sheets(1)

shPrint.Range("A202:J1200").Value = ""

' Setting a range to to a prepared array
shPrint.Range("A201:J" & CStr(201 + UBound(arrKortXL, 1))).Value =
arrKortXL

Dim iKort As Integer

' This is an effort to stop display in one page by defining separate
print area entries in the range string
Do While iKort < UBound(arrKortXL, 1):
sPrtAreaAdr = sPrtAreaAdr & ",A" & CStr(200 + iKort) & ":J" &
CStr(200 + iKort + 79)
iKort = iKort + 80
Loop

shPrint.PageSetup.PrintArea = sPrtAreaAdr
shPrint.PrintOut Preview:=True

The above still produces one printout page in the preview with the zoom

set
to a very low figure. I want a new page per 80 lines. I could define

each
80
lines separately and printout right away before defining the next, but

then
my footer with page number and total number of pages won't make any

sense.

Hope that someone can help.


With kind regards,




Frank M.






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
how do I print multiple print areas on one page Leo18 Excel Discussion (Misc queries) 1 January 11th 10 07:28 PM
print areas on one page to print? Stacey Excel Discussion (Misc queries) 2 December 20th 06 03:11 PM
How to Print different areas on one page Bryan Bloom Excel Discussion (Misc queries) 4 August 21st 06 07:21 PM
Can i print non-contiguous areas on one page?? yiota Excel Discussion (Misc queries) 2 March 27th 06 02:51 PM
Can i print non-contiguous areas on one page yiota Excel Worksheet Functions 1 March 27th 06 12:30 PM


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