Variable footers in Excel?

Microsoft Excel 2003 (full product)
September 16, 2010 at 10:05:06
Specs: Windows XP
I need a footer to be a variable.

The footer should read a cell containing a date that will change each week.

Thanks!


See More: Variable footers in Excel?

Report •

#1
September 16, 2010 at 12:31:49
The BeforePrint event can be used to check a specific cell and create the footer immediately before printing.

Code similar to this would be placed in the ThisWorkbook module of the VBA editor.

Private Sub Workbook_BeforePrint(Cancel As Boolean)

Dim WS As Worksheet
For Each WS In Worksheets
    WS.PageSetup.LeftFooter = ThisWorkbook.FullName & " " & _
        Worksheets("Sheet2").Range("A5").Value
Next WS
End Sub


Report •
Related Solutions


Ask Question