S
swatsp0p
OK, gang, help me out here, please. I have researched several similar
threads that don't completely address the question. I have seen
multiple responses that show how to make a cell's contents the Header,
e.g.:
Code:
--------------------
Private Sub Workbook_BeforePrint(Cancel As Boolean)
With ActiveSheet.PageSetup
.CenterHeader = ActiveSheet.Range("I3").Value
End With
End Sub
--------------------
However, I have not found one that has addressed the situation where a
cell reference is just a -part- of the Header. e.g. I would like a
header that combines some text and pulls a date from a cell. I have a
formula that creates the desired output in a cell:
="TIME SHEET DATA, "&TEXT(DATE(YEAR(I3),MONTH(I3),DAY(I3)),"MMMM")&"
"&YEAR(I3)
and I can use it as "Print Titles...Rows to Repeat at Top", but this is
not my first choice.
Is there a way to incorporate all of this in the header via code (and
make it dynamic)?
Thanks in advance for your insight and guidance.
Bruce
threads that don't completely address the question. I have seen
multiple responses that show how to make a cell's contents the Header,
e.g.:
Code:
--------------------
Private Sub Workbook_BeforePrint(Cancel As Boolean)
With ActiveSheet.PageSetup
.CenterHeader = ActiveSheet.Range("I3").Value
End With
End Sub
--------------------
However, I have not found one that has addressed the situation where a
cell reference is just a -part- of the Header. e.g. I would like a
header that combines some text and pulls a date from a cell. I have a
formula that creates the desired output in a cell:
="TIME SHEET DATA, "&TEXT(DATE(YEAR(I3),MONTH(I3),DAY(I3)),"MMMM")&"
"&YEAR(I3)
and I can use it as "Print Titles...Rows to Repeat at Top", but this is
not my first choice.
Is there a way to incorporate all of this in the header via code (and
make it dynamic)?
Thanks in advance for your insight and guidance.
Bruce