The Master sheet contains a row of sheet numbers from 1 (in F3) onward. The code needs to loop through row 3 offsetting one column from F3 each time because the number of sheets changes. I can set the footer using a single active sheet, but when I try run this loop to set each sheet to have the 4th row value from the Master sheet in it's footer, nothing happens.
Sub Footer()
i = 0
Do While IsEmpty(Worksheets("Master Sheet").Range("F3").Offset(0, i)) <> True
ds_name = Worksheets("Master Sheet").Range("F3").Offset(0, i)
footer_value = Worksheets("Master Sheet").Range("F3").Offset(4, i)
Application.Worksheets(ds_name).PageSetup.LeftFooter = "Doc " & footer_value
i = i + 1
Loop
End Sub
Does anyone know what I'm doing wrong?