Thread: custom header
View Single Post
  #6   Report Post  
Dave Peterson
 
Posts: n/a
Default

Maybe posting what you tried would help get a better response.

Marlis wrote:

I am lost as to what to do. I don't seem to understand what to do.

"Dave Peterson" wrote:

One way is to use a macro.

Option Explicit
Private Sub Workbook_BeforePrint(Cancel As Boolean)

Dim myHeaderStr As String
Dim iCtr As Long

myHeaderStr = Worksheets("sheet3").Range("C9").Value

For iCtr = 2 To Worksheets.Count
Worksheets(iCtr).PageSetup.LeftHeader = myHeaderStr
Next iCtr

End Sub

(I used c9 on sheet3 (you didn't say which sheet to use).)

This code goes in the ThisWorkbook module.

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Marlis wrote:

I would like to know how to set up a custom header which shows the data in a
perticular cell (i.e. - C9 shows the number 100, so I want the header in all
the pages,except the first, to show "100".

Thank you


--

Dave Peterson


--

Dave Peterson