Hi,
If anyone is willing to take time to help, I could use some guidance on inserting an "if sheet name equals" statement within a macro I have for auto-populating header/footer of a worksheet. I'm still a beginner in learning macros, but feel this should be something simple I can figure out. Unfortunately I can't seem to get my head wrapped around a fix.
The maco loops through each worksheet and populates the header and footer based on a cell reference. However, one worksheet needs to have information populated in the left footer. I tried to do this by referencing the sheet name, but I get an object error.
It works if I use ActiveSheet.Name = "SheetName". The only issue is if I use a print workbook function, the left footer does not update. I have to actively select the referenced worksheet and print preview to get it to update.
How can I have this macro work without using ActiveSheet.Name so I don't have to actively select the sheet, and manually perform a print preview?
The code I'm using is (red text is where I need the help):
I would greatly appreciate the time anyone is willing to offer.
Bookmarks