ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Setting up and Configuration of Excel (https://www.excelbanter.com/setting-up-configuration-excel/)
-   -   How do I print a cell's contents as a footer? (https://www.excelbanter.com/setting-up-configuration-excel/27737-how-do-i-print-cells-contents-footer.html)

TC

How do I print a cell's contents as a footer?
 
I would like to be able to specify a cell as a footer and thereby have that
cell's contents printed as a footer in Excel 2003.

Bob Phillips

Private Sub Workbook_BeforePrint(Cancel As Boolean)
With ActiveSheet
If .Name = "Sheet1" Then
.PageSetup.LeftFooter -.Range("A1").Text
End If
End With
End Sub

'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code


--

HTH

RP
(remove nothere from the email address if mailing direct)


"TC" wrote in message
...
I would like to be able to specify a cell as a footer and thereby have

that
cell's contents printed as a footer in Excel 2003.





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

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