Custom Header - poss to link to contents of cell?
Hi Kevcar,
Thanks for your reply but I'm obviously missing something as I can't get
this to work. Was I supposed to give the workshhet a particular name?
Cheers again
--
Smudge
"kevcar40" wrote:
hi
not sure exactly what you want but i use the following to copy the
contents of a cell into the headers and footers
Sub HeaderandFooter()
Dim s As Integer
For s = 1 To Worksheets.Count
Worksheets(s).PageSetup.CenterFooter = "&""Arial""&7" &
ThisWorkbook.Worksheets("sheet1").Range("E1").Valu e
Worksheets(s).PageSetup.LeftHeader = "&""Arial""&7" &
ThisWorkbook.Worksheets("sheet1").Range("B1").Valu e
' Worksheets(s).PageSetup.RightHeader = "&""Arial""&7" &
ThisWorkbook.Worksheets("sheet1").Range("C1").Valu e
Worksheets(s).PageSetup.LeftFooter = "&""Arial""&7" &
ThisWorkbook.Worksheets("sheet1").Range("D1").Valu e
Worksheets(s).PageSetup.RightFooter = "&""Arial""&7" &
ThisWorkbook.Worksheets("sheet1").Range("C1").Valu e
' Worksheets(s).PageSetup.CenterHeader = "&""Arial""&7" &
ThisWorkbook.Worksheets("sheet1").Range("F1").Valu e
Next s
End Sub
Paste the code into a macro, type some data into the cells
and test the results
HTH
kevin
On 18 Oct, 11:50, Smudge wrote:
Hi everyone,
Is it possible to use a cell reference in the custom header to pick up info
in a cell in the worksheet?
TIA
--
Smudge
|