ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Cell Reference in Header (https://www.excelbanter.com/excel-discussion-misc-queries/27083-cell-reference-header.html)

Dave

Cell Reference in Header
 
Is there a way to reference a specific worksheet cell in the header?

Thanks


Gord Dibben

Dave

Macro..........

Sub CellInFooter()
With ActiveSheet
.PageSetup.CenterFooter = .Range("A1").text
End With
End Sub

Alternative........

Private Sub Workbook_BeforePrint(Cancel As Boolean)
With ActiveSheet
.PageSetup.CenterFooter = .Range("A1").Text
End With
End Sub


Gord Dibben Excel MVP

On Fri, 20 May 2005 11:38:05 -0700, "Dave"
wrote:

Is there a way to reference a specific worksheet cell in the header?

Thanks




All times are GMT +1. The time now is 11:47 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com