Blank Line in Header Text

  • Thread starter Thread starter S. S.
  • Start date Start date
S

S. S.

When setting up a header using a VB macro, how does one
include a blank line?

Worksheets("Master").PageSetup.CenterHeader = "Text on
Line One" & "Text on Line Two"

I know this does not put the text on two separate lines.
What magical code will help?

Thanks

S.
 
Try something like

Worksheets("Master").PageSetup.CenterHeader = "Line 1" & vbCrLf &
"Line 2"


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 

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

Back
Top