PS: If there is another way to do this, like reference a named section somehow from within the header, that's what the ^[Doc] was meant to be. But everything online points to VBA.

I would the page header to display some values from the workbook as values in the header. I did google this and none of the results we're able to produce anything working. Not even any errors, the headers just stay blank.So here is what I would like to be referenced:

And here is the VBA code I have been trying to make work. This is just the latest snippet I have worked with, Its been a few days of scouring the internet for something that will work. I am convinced it's my implementation that is incorrect.

So the code I found online, in my original post at the top, I could not get to work. The functions Author() and Doc() do work. I just tried what you posted and could not get it to work, do I need something like ^[Workbook_BeforePrint] in the header or something along those lines?

You need to create the code for the workbook, not in a sheet.Open VBA editor, double click ‘This Workbook’ in the Microsoft Excel Objects folder (in the ‘Project - VBAProject’ panel to the left). In the code window, you will see two drop down menus; in the first select Workbook and the second Before Print...then type the rest of the code as below.

Ok, so I just tested this myself and also couldn't get it to work. I found a solution (or rather a workaround) from the Microsoft support pages....So, if you do as per my last post BUT also enter the same code in a regular module, it will work. Although the background code is 'BeforePrint' the header does not actually display until it has been printed.

@Charla74 Thanks so much for the reply. I think I followed your instructions. Here is a screenshot of "ThisWorkbook" and the exact same code is inside "Module1". Does this look correct per your instructions?

I wasn’t sure but I suspected that the two FUNCTION segments, in the Worksheet code, may cause an issue. If you remove those two parts of the code and leave them as they are in the regular module you may have a better outcome.