thevillageinn
Technical User
I'm attempting to adjust the header on my spreadsheet to display the value of a cell (A2 in this case).
I understand that I need to use the BeforePrint command, but I am stumped as to how to call it or name it or reference it so that it sets my header.
I am somewhat familiar with VBA in Access, but I'm having a hard time wrapping my mind around the Excel model.
my code currently looks like this:
Thanks in advance for any assistance offered.
-Dan
I understand that I need to use the BeforePrint command, but I am stumped as to how to call it or name it or reference it so that it sets my header.
I am somewhat familiar with VBA in Access, but I'm having a hard time wrapping my mind around the Excel model.
my code currently looks like this:
Code:
Public Sub BeforePrint(Cancel As Integer)
Worksheets("Sheet1").PageSetup.LeftHeader = Worksheets("Sheet1").Range("A2")
End Sub
Thanks in advance for any assistance offered.
-Dan