I'm trying to updatespecific tabs with a header using Visual Basic. Below is the code I have sofar. It's pointing to a specific tab ("PrintPage") and looking at G12down on PrintPage and adding a new right page header. This code works like a charmwhen I want to print the list of tabs just by putting .PrintOut afterSheets(Ary). Instead of printing the tabs that are listed on column G onPrintpage, I want to change the headers for those tabs. I'm getting an error onthe pagesetup line.
Thanks
Code:
SubChangeHeaders()
Dim Ary As Variant
With Sheets("PrintPage")
Ary = Application.Transpose(.Range("G12",.Range("G" & Rows.Count).End(xlUp)).Value)
End With
Sheets(Ary).PageSetup.RightHeader = "New Header"
End Sub
Thanks