Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 33
Default Using VBA to insert a multiple-row title in the CenterHeader

How does one do the above. I am able to insert a single line but have not
figured out how to insert two or more lines.

--
Thanks and Peace
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Using VBA to insert a multiple-row title in the CenterHeader

Private Sub Workbook_BeforePrint(Cancel As Boolean)
With ActiveSheet.PageSetup
.LeftHeader = "Line 1" & Chr(10) & "Line 2"
End With
End Sub

'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Montana" wrote in message
...
How does one do the above. I am able to insert a single line but have not
figured out how to insert two or more lines.

--
Thanks and Peace



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 33
Default Using VBA to insert a multiple-row title in the CenterHeader

Thanks for the quick response. I will give it a try.
--
Peace


"Bob Phillips" wrote:

Private Sub Workbook_BeforePrint(Cancel As Boolean)
With ActiveSheet.PageSetup
.LeftHeader = "Line 1" & Chr(10) & "Line 2"
End With
End Sub

'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Montana" wrote in message
...
How does one do the above. I am able to insert a single line but have not
figured out how to insert two or more lines.

--
Thanks and Peace




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
automatically insert salary based on job title [email protected] Excel Worksheet Functions 2 October 28th 08 06:06 AM
Setting LeftHeader / CenterHeader MBaas Excel Programming 3 August 17th 06 04:56 PM
Insert some cells by keeping the title block as same S.G.Pillai Excel Discussion (Misc queries) 0 February 27th 06 01:19 PM
VBA Code to Print a Variable as part of CenterHeader Problem gvlral Excel Programming 2 January 30th 05 06:27 PM
Excel generation and PageSetup.CenterHeader lfb Excel Programming 3 February 9th 04 05:24 PM


All times are GMT +1. The time now is 03:25 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"