Headers & Footers _auto update info from a cell in the worksheet
You can do with using the below code..Set the Security level to low/medium in
(Tools|Macro|Security). From workbook launch VBE using short-key Alt+F11.
From the left treeview double click 'This Workbook' and copy the below code
to the code panel..Press Alt+F11 to return to workbook. Check out print
preview. The header and footer will be set to the content in cell A1 of the
1st sheet. Try and feedback.
Private Sub Workbook_BeforePrint(Cancel As Boolean)
For Each ws In Me.Worksheets
ws.PageSetup.CenterFooter = Sheets(1).Range("A1")
ws.PageSetup.CenterHeader = Sheets(1).Range("A1")
Next
End Sub
If this post helps click Yes
---------------
Jacob Skaria
"N Walton" wrote:
Hi,
Is there a way I can get the "headers & footers" for all the sheets in an
excel work book to automatically update with info from a cell in the 1st
worksheet?
E.g my 1st worksheet has "Issue 3" in a cell which I would like to be
displayed in the "headers & Footers" of each sheet & automatically update the
headers & footers of each sheet when the Issue number in a cell on the 1st
sheet changes to say Issue 4.
Thanks
--
N Walton
|