View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Pam in California
 
Posts: n/a
Default Can custom headers be linked to a cell in the worksheet?

I'm trying to enter this marco, and need some clarification as I am having
some trouble with with macro.
With Worksheets("sheet 1"), sheet 1 would be the worksheet that contains
the information, and the range "a1" is the cell, correct? My worksheet name
is Expense Worksheet. Do I need to change the worksheet name to
Expense_Worksheet?

I would like the text in cell a1, which is my e7, to be in the header on all
7 of my worksheets - is this possible?

I hope this makes sense. Thanks for your help.
-pam


"Dave Peterson" wrote:

You could use a macro...

For instance, this code goes behind the ThisWorkbook module:

Option Explicit
Private Sub Workbook_BeforePrint(Cancel As Boolean)
With Worksheets("sheet1")
.PageSetup.LeftHeader = .Range("a1").Text
End With
End Sub



Texas_Toast wrote:

This was a feature in 123 where header or footer information could be
retrieved from a cell in the worksheet. Is there anything similar in Excel?


--

Dave Peterson