PC Review Forums Newsgroups Microsoft Excel Microsoft Excel Setup Column headers appearing on every page

Reply

Column headers appearing on every page

 
Thread Tools Rate Thread
Old 07-06-2007, 11:35 AM   #1
=?Utf-8?B?Q3JhaWcgRw==?=
Guest
 
Posts: n/a
Default Column headers appearing on every page


When using page breaks, my column headers appear on the top of each page.

However I want to the last page of the the sheet to not show these headers
but cannot find a way to do this.

Please note these are column headers and not 'header/footer' headers.

Any help would be appreciated!

Thanks
Craig
  Reply With Quote
Old 07-06-2007, 05:04 PM   #2
Gord Dibben
Guest
 
Posts: n/a
Default Re: Column headers appearing on every page

Craig

I assume you have "rows to repeat at top" set to row 1 which is your title row.

With this setting it all or nothing unless you employ some VBA.

Here is a revision of a Ron de Bruin macro which will suppress the title row on
last page.

Sub Test()
Dim TotPages As Long
TotPages = Application.ExecuteExcel4Macro("GET.DOCUMENT(50)")
With ActiveSheet.PageSetup
.PrintTitleRows = "$1:$1"
ActiveSheet.PrintOut From:=1, To:=TotPages - 1
.PrintTitleRows = False
ActiveSheet.PrintOut From:=TotPages, To:=TotPages
End With
End Sub


Gord Dibben MS Excel MVP

On Thu, 7 Jun 2007 03:35:00 -0700, Craig G <Craig G@discussions.microsoft.com>
wrote:

>When using page breaks, my column headers appear on the top of each page.
>
>However I want to the last page of the the sheet to not show these headers
>but cannot find a way to do this.
>
>Please note these are column headers and not 'header/footer' headers.
>
>Any help would be appreciated!
>
>Thanks
>Craig


  Reply With Quote
Old 11-06-2007, 11:32 AM   #3
=?Utf-8?B?Q3JhaWcgRw==?=
Guest
 
Posts: n/a
Default Re: Column headers appearing on every page

That's great. Thanks Gord!

Craig

"Gord Dibben" wrote:

> Craig
>
> I assume you have "rows to repeat at top" set to row 1 which is your title row.
>
> With this setting it all or nothing unless you employ some VBA.
>
> Here is a revision of a Ron de Bruin macro which will suppress the title row on
> last page.
>
> Sub Test()
> Dim TotPages As Long
> TotPages = Application.ExecuteExcel4Macro("GET.DOCUMENT(50)")
> With ActiveSheet.PageSetup
> .PrintTitleRows = "$1:$1"
> ActiveSheet.PrintOut From:=1, To:=TotPages - 1
> .PrintTitleRows = False
> ActiveSheet.PrintOut From:=TotPages, To:=TotPages
> End With
> End Sub
>
>
> Gord Dibben MS Excel MVP
>
> On Thu, 7 Jun 2007 03:35:00 -0700, Craig G <Craig G@discussions.microsoft.com>
> wrote:
>
> >When using page breaks, my column headers appear on the top of each page.
> >
> >However I want to the last page of the the sheet to not show these headers
> >but cannot find a way to do this.
> >
> >Please note these are column headers and not 'header/footer' headers.
> >
> >Any help would be appreciated!
> >
> >Thanks
> >Craig

>
>

  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off