ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Blank Line in Header Text (https://www.excelbanter.com/excel-programming/284165-blank-line-header-text.html)

S. S.

Blank Line in Header Text
 
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.

Chip Pearson

Blank Line in Header Text
 
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



"S. S." wrote in message
...
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.





All times are GMT +1. The time now is 04:34 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com