Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 43
Default VB.NET line break in header code

Thanks to Chip's help, I have the code to set up a header on my Excel
Worksheet:

CDRLWs.PageSetup.LeftHeader = "CDRL: " & ComboBox2.Text & " DID No.: N/A"

Yet, I was wondering if there was a way to put a line break in the middle.

I would like my left header to look like this (currently, it is on one line):

CDRL: A001
DID No.: N/A

Is there a way to set this up properly?

Thanks in Advance,
Elena
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default VB.NET line break in header code

Elena,

Try something like

ActiveSheet.PageSetup.CenterHeader = "Line One" & Chr(10) & "Line
Two"


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



"Elena" wrote in message
...
Thanks to Chip's help, I have the code to set up a header on my
Excel
Worksheet:

CDRLWs.PageSetup.LeftHeader = "CDRL: " & ComboBox2.Text & " DID
No.: N/A"

Yet, I was wondering if there was a way to put a line break in
the middle.

I would like my left header to look like this (currently, it
is on one line):

CDRL: A001
DID No.: N/A

Is there a way to set this up properly?

Thanks in Advance,
Elena



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 43
Default VB.NET line break in header code

PERFECT!

"Chip Pearson" wrote:

Elena,

Try something like

ActiveSheet.PageSetup.CenterHeader = "Line One" & Chr(10) & "Line
Two"


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



"Elena" wrote in message
...
Thanks to Chip's help, I have the code to set up a header on my
Excel
Worksheet:

CDRLWs.PageSetup.LeftHeader = "CDRL: " & ComboBox2.Text & " DID
No.: N/A"

Yet, I was wondering if there was a way to put a line break in
the middle.

I would like my left header to look like this (currently, it
is on one line):

CDRL: A001
DID No.: N/A

Is there a way to set this up properly?

Thanks in Advance,
Elena




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Omit header from first page without embedding header in code ibvalentine Excel Worksheet Functions 6 August 28th 07 05:10 AM
Break cell into multiple lines by line break Chia Excel Discussion (Misc queries) 1 August 20th 06 06:37 AM
Inserting header @ page break Esrei Excel Discussion (Misc queries) 1 August 12th 05 01:36 PM
1st line is the header, how do I have it print as the first line Tom Ogilvy Excel Programming 0 September 21st 04 10:29 PM
1st line is the header, how do I have it print as the first line Ron de Bruin Excel Programming 0 September 21st 04 10:12 PM


All times are GMT +1. The time now is 07:52 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"