+ Reply to Thread
Results 1 to 2 of 2

Cell Data Header Only Shows Last Line of Multi-lined Cell Data Header

  1. #1
    Forum Contributor
    Join Date
    10-03-2012
    Location
    CDN
    MS-Off Ver
    Excel 2007
    Posts
    135

    Cell Data Header Only Shows Last Line of Multi-lined Cell Data Header

    Hello All,

    Below is my VBA code to use for the cell header of my workbook. I would like all sheets, when printed to show the header data below.

    Please Login or Register  to view this content.
    Unfortunately, the only header data I see is the last line of each alignment. The results are Leftheader=C13, centerheader=C11, and rightheader=Page X of Y.

    Can anyone tell me what I'm doing wrong and why I can do to fix this? Idealy I'd like to see the other each data on a new line in the header, for example the left header would be C9, <new line> C13, and so forth.

    Any help you guru's out there?

  2. #2
    Forum Contributor
    Join Date
    10-03-2012
    Location
    CDN
    MS-Off Ver
    Excel 2007
    Posts
    135

    Re: Cell Data Header Only Shows Last Line of Multi-lined Cell Data Header

    For those of you reading this, I have solved it.

    Apparently, only one leftheader/centerheader/rightheader can exist (well it my case at least).

    I needed to combine the lines for example, ws.PageSetup.LeftHeader = "TEXT ON FIRST LINE" & Chr(10) & wsT.Range("C9").Value

    They key was recongnizing that Chr(10) drops the it into the next line and the & includes more text.

    Thanks all.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1