[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.excel.programming

Multiple print title rows

ChrisO

12/19/2006 9:42:00 AM

Hello,

I have a worksheet with two sections of data, both of which may spread
across multiple pages in printed output.

Each section has a different set of column headers, which I want to use as
the title row for each printed page.

I am familiar with using the PrintTitleRows property but this only allows me
to have one title row(s), which is fine for the first section but not for the
second one.

Can anyone tell me if there is a way (in a macro) to set up separate title
rows for different sections of a single worksheet.

Many thanks.

Chris
3 Answers

Martin Fishlock

12/19/2006 10:43:00 AM

0

Chris,

You can print out more than one row in the headers.

So you set the print titles and the print area with the following:

With ActiveSheet.PageSetup
.PrintTitleRows = "$1:$3"
.PrintTitleColumns = ""
.PrintArea = "$4:$16"
End With

and then print it out and then you set the print titles and the print area
again with the following:

With ActiveSheet.PageSetup
.PrintTitleRows = "$30:$32"
.PrintTitleColumns = ""
.PrintArea = "$33:$166"
End With

and then print it out.
--
Hope this helps
Martin Fishlock
Please do not forget to rate this reply.


"ChrisO" wrote:

> Hello,
>
> I have a worksheet with two sections of data, both of which may spread
> across multiple pages in printed output.
>
> Each section has a different set of column headers, which I want to use as
> the title row for each printed page.
>
> I am familiar with using the PrintTitleRows property but this only allows me
> to have one title row(s), which is fine for the first section but not for the
> second one.
>
> Can anyone tell me if there is a way (in a macro) to set up separate title
> rows for different sections of a single worksheet.
>
> Many thanks.
>
> Chris

ChrisO

12/19/2006 10:53:00 AM

0

Martin,

Thanks for your response. I think your approach involves setting the print
area and title row(s) for a section then printing this section, resetting
both for the second section and then printing this. What I really want to do
is to print both sections in one go with different title row(s) for each
section.

Chris

"Martin Fishlock" wrote:

> Chris,
>
> You can print out more than one row in the headers.
>
> So you set the print titles and the print area with the following:
>
> With ActiveSheet.PageSetup
> .PrintTitleRows = "$1:$3"
> .PrintTitleColumns = ""
> .PrintArea = "$4:$16"
> End With
>
> and then print it out and then you set the print titles and the print area
> again with the following:
>
> With ActiveSheet.PageSetup
> .PrintTitleRows = "$30:$32"
> .PrintTitleColumns = ""
> .PrintArea = "$33:$166"
> End With
>
> and then print it out.
> --
> Hope this helps
> Martin Fishlock
> Please do not forget to rate this reply.
>
>
> "ChrisO" wrote:
>
> > Hello,
> >
> > I have a worksheet with two sections of data, both of which may spread
> > across multiple pages in printed output.
> >
> > Each section has a different set of column headers, which I want to use as
> > the title row for each printed page.
> >
> > I am familiar with using the PrintTitleRows property but this only allows me
> > to have one title row(s), which is fine for the first section but not for the
> > second one.
> >
> > Can anyone tell me if there is a way (in a macro) to set up separate title
> > rows for different sections of a single worksheet.
> >
> > Many thanks.
> >
> > Chris

Martin Fishlock

12/19/2006 11:57:00 AM

0

To the best of my knowledge 'No can do'.

The way that I have done it is to emulate the printing and then set the page
numbers if need etc. for the second run.

Maybe 2007 allows us to do it.......
--
Hope this helps
Martin Fishlock
Please do not forget to rate this reply.


"ChrisO" wrote:

> Martin,
>
> Thanks for your response. I think your approach involves setting the print
> area and title row(s) for a section then printing this section, resetting
> both for the second section and then printing this. What I really want to do
> is to print both sections in one go with different title row(s) for each
> section.
>
> Chris
>
> "Martin Fishlock" wrote:
>
> > Chris,
> >
> > You can print out more than one row in the headers.
> >
> > So you set the print titles and the print area with the following:
> >
> > With ActiveSheet.PageSetup
> > .PrintTitleRows = "$1:$3"
> > .PrintTitleColumns = ""
> > .PrintArea = "$4:$16"
> > End With
> >
> > and then print it out and then you set the print titles and the print area
> > again with the following:
> >
> > With ActiveSheet.PageSetup
> > .PrintTitleRows = "$30:$32"
> > .PrintTitleColumns = ""
> > .PrintArea = "$33:$166"
> > End With
> >
> > and then print it out.
> > --
> > Hope this helps
> > Martin Fishlock
> > Please do not forget to rate this reply.
> >
> >
> > "ChrisO" wrote:
> >
> > > Hello,
> > >
> > > I have a worksheet with two sections of data, both of which may spread
> > > across multiple pages in printed output.
> > >
> > > Each section has a different set of column headers, which I want to use as
> > > the title row for each printed page.
> > >
> > > I am familiar with using the PrintTitleRows property but this only allows me
> > > to have one title row(s), which is fine for the first section but not for the
> > > second one.
> > >
> > > Can anyone tell me if there is a way (in a macro) to set up separate title
> > > rows for different sections of a single worksheet.
> > >
> > > Many thanks.
> > >
> > > Chris