Headers & Footers _auto update info from a cell in the workshe
Hi Mike,
I tried it & it didnt seem to work I kept getting debug. so I changed it
slightly (see below) as I only want the right header to auto update form cell
a1. However I have not really used this vbu code stuff before so I am a
beginner im afraid but am trying to widen my knowledge in excel. Have you any
suggestions where I am going wrong? (The debugger point at the line stating
with sheets (x).pageSetup)
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address < "$A$1" Then Exit Sub
For x = 1 To Worksheets.Count
Sheets(x).PageSetup.RightHeader = Sheets("Sheet1").Range("A1").Value
Next
End Sub
--
N Walton
"Mike H" wrote:
Hi,
Lets assume you are using A1 of Sheet 1 to hold your footer information.
Right click the sheet tab, view code and paste this in. When you change A1
all the footers will change
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address < "$A$1" Then Exit Sub
For x = 1 To Worksheets.Count
Sheets(x).PageSetup.LeftFooter = Sheets("Sheet1").Range("A1").Value
Next
End Sub
Mike
"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
|