+ Reply to Thread
Results 1 to 3 of 3

Working with headers in pagesetup

Hybrid View

  1. #1
    OkieViking
    Guest

    Working with headers in pagesetup

    I want to add a header as below. However, I want to replace the word "Test"
    with a variable. How do I do that and still retain the formatting?

    With ActiveSheet.PageSetup
    .CenterHeader = "&""Arial,Bold""&14Test"
    End With


    Thanks

  2. #2
    William
    Guest

    Re: Working with headers in pagesetup

    Hi Okie

    With ActiveSheet.PageSetup
    ..CenterHeader = "&""Arial,Bold""&14" & _
    ActiveSheet.Range("M1")
    End With
    --

    -----
    XL2003
    Regards

    William

    willwest22@yahoo.com


    "OkieViking" <OkieViking@discussions.microsoft.com> wrote in message
    news:E469C8F1-5081-4266-A21E-6948F7B20640@microsoft.com...
    >I want to add a header as below. However, I want to replace the word
    >"Test"
    > with a variable. How do I do that and still retain the formatting?
    >
    > With ActiveSheet.PageSetup
    > .CenterHeader = "&""Arial,Bold""&14Test"
    > End With
    >
    >
    > Thanks




  3. #3
    Mike Fogleman
    Guest

    Re: Working with headers in pagesetup

    Dim myvar
    Dim hdr
    myvar = ??? 'replace the word "Test"
    hdr = "14"& myvar

    With ActiveSheet.PageSetup
    .CenterHeader = "&""Arial,Bold""&hdr"
    End With

    Should get you close to what you want
    Mike F
    "OkieViking" <OkieViking@discussions.microsoft.com> wrote in message
    news:E469C8F1-5081-4266-A21E-6948F7B20640@microsoft.com...
    >I want to add a header as below. However, I want to replace the word
    >"Test"
    > with a variable. How do I do that and still retain the formatting?
    >
    > With ActiveSheet.PageSetup
    > .CenterHeader = "&""Arial,Bold""&14Test"
    > End With
    >
    >
    > Thanks




+ 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