Displaying something within a range name in an Excel Header

B

Barb Reinhardt

I have the following code to modify the header for the worksheet.

Sub Workbook_BeforePrint(Cancel As Boolean)
Application.ScreenUpdating = False
With ActiveSheet.PageSetup
.LeftHeader = ""
.CenterHeader = _
"&""Arial,Bold""&12TITLE &""Arial,Regular""&10" _
& Chr(10) & "Last date saved: " &
Format(ThisWorkbook.BuiltinDocumentProperties("last save time").Value,
"dd-mmm-yyyy")
.RightHeader = ""
.LeftFooter = ""
.CenterFooter = "" & Chr(10) & "&P of &N"
.RightFooter = ""
End With
Application.ScreenUpdating = True
End Sub

Where I have TITLE, I want to display the value of the range name "TEST" and
then follow it with TITLE. What do I need to change to get this to work?'

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top