#1   Report Post  
Peter
 
Posts: n/a
Default Header question

Hi,

Can anyone please advise if it is possible to have the header in an
Excel 2003 workbook only apply to the first worksheet and not to the
subsequent worksheets in that workbook?

If so, how to achieve it?


--
Cheers

Peter

Please remove the invalid to reply
  #2   Report Post  
Paul B
 
Posts: n/a
Default

Peter, here is one way by Ron de Bruin

Sub print_header()

'will print header on 1st page only

'By: Ron de Bruin

Totpage = Application.ExecuteExcel4Macro("GET.DOCUMENT(50)")

With ActiveSheet.PageSetup

.LeftHeader = "test"

.CenterFooter = ActiveSheet.Range("A1")

.CenterHeader = "&8Page &8&P & of &N"

ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1

.LeftHeader = ""

.CenterHeader = ""

ActiveWindow.SelectedSheets.PrintOut From:=2, To:=Totpage

End With

End Sub


--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003


"Peter" wrote in message
...
Hi,

Can anyone please advise if it is possible to have the header in an
Excel 2003 workbook only apply to the first worksheet and not to the
subsequent worksheets in that workbook?

If so, how to achieve it?


--
Cheers

Peter

Please remove the invalid to reply



  #3   Report Post  
Peter
 
Posts: n/a
Default

On Mon, 1 Aug 2005 11:29:20 -0400, "Paul B"
wrote:

Peter, here is one way by Ron de Bruin

Sub print_header()

'will print header on 1st page only

'By: Ron de Bruin

Totpage = Application.ExecuteExcel4Macro("GET.DOCUMENT(50)")

With ActiveSheet.PageSetup

.LeftHeader = "test"

.CenterFooter = ActiveSheet.Range("A1")

.CenterHeader = "&8Page &8&P & of &N"

ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1

.LeftHeader = ""

.CenterHeader = ""

ActiveWindow.SelectedSheets.PrintOut From:=2, To:=Totpage

End With

End Sub



Many thanks Paul
--
Cheers

Peter

Please remove the invalid to reply
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
Custom Header and Footer Dave Excel Discussion (Misc queries) 1 March 23rd 05 09:24 PM
Graphic in Header scaling with pages contents Shannon Broskie Excel Discussion (Misc queries) 0 February 15th 05 10:29 PM
header or footer ParTeeGolfer Excel Worksheet Functions 4 January 9th 05 08:33 PM
how do I permanetly add custom header to excel header list? GARY Excel Discussion (Misc queries) 1 December 15th 04 09:52 PM
Default header in Excel under page set-up Melanie Excel Discussion (Misc queries) 2 December 15th 04 02:37 AM


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