Results 1 to 3 of 3

Thread: excel

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 2002
    Posts
    99

    Post excel

    any body know how can i use different font in centerheader
    using vb to excel

    i use this to change to bold


    xlsheet.PageSetup.CenterHeader = "&B" & "Hello"

  2. #2
    PowerPoster
    Join Date
    Aug 2001
    Location
    new jersey
    Posts
    2,904
    I don't know the answer, but if I were looking for the answer, I'd look in the object browser

  3. #3
    Evil Genius alex_read's Avatar
    Join Date
    May 2000
    Location
    Espoo, Finland
    Posts
    5,538
    Admittedly this one wasn't fantastically documented (if it was in the help files at all)! What you can do for another time is create a macro, carry out the procedure (i.e. like setting the font on the center header), then stopping the macro and looking at the code it created by hitting Alt+F11 to get into the VBA IDE, then going into the module1.bas module in the project explorer.
    VB Code:
    1. ActiveSheet.PageSetup.CenterHeader = "&""Comic Sans MS,Regular""SampleText"
    By the way, we now have a new VBA forum for any Excel related vba questions too, please post there next time...

    Please rate this post if it was useful for you!
    Please try to search before creating a new post,
    Please format code using [ code ][ /code ], and
    Post sample code, error details & problem details

Posting Permissions

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



Click Here to Expand Forum to Full Width