Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.setup
external usenet poster
 
Posts: 1
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
  #2   Report Post  
Posted to microsoft.public.excel.setup
external usenet poster
 
Posts: 22,906
Default 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
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


  #3   Report Post  
Posted to microsoft.public.excel.setup
external usenet poster
 
Posts: 1
Default 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
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
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
Printing Headers on only first page and Footers on only last page JacMar Excel Discussion (Misc queries) 5 January 21st 07 03:48 PM
printing headers on every page Sam Hodo Excel Discussion (Misc queries) 2 October 13th 06 10:44 PM
Repeating the Row Headers on each page TS Excel Discussion (Misc queries) 1 December 6th 05 08:16 PM
1st page only Headers & Footers Etijian Excel Discussion (Misc queries) 3 August 3rd 05 03:31 PM
How do I have headers show at the top of every page? dgmoreau Excel Worksheet Functions 1 February 13th 05 01:45 AM


All times are GMT +1. The time now is 04:23 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"