Consulting

Results 1 to 3 of 3

Thread: Header Font

  1. #1
    VBAX Regular Andrew's Avatar
    Joined
    Jun 2004
    Location
    Nagoya, Japan
    Posts
    13

    Header Font

    Hello Everyone,

    Is it possible to modify this code so that the font is Arial 14.

    Sub HeaderDate()
    ActiveSheet.PageSetup.RightHeader = Format(Date, "d mmmm yyyy")
    End Sub
    Clumsy clod that I am, I've tried doing this with the recorder and am now in despair. Thanks.



  2. #2
    VBAX Mentor CBrine's Avatar
    Joined
    Jun 2004
    Location
    Toronto, Canada
    Posts
    387
    Location
    Andrew,
    The online help in the vba editor should define all the available formatting codes. Here's what you are looking for.

    Sub HeaderDate()
    ActiveSheet.PageSetup.RightHeader = "&16&""Arial""" & Format(Date, "d mmmm yyyy")
    End Sub
    The most difficult errors to resolve are the one's you know you didn't make.


  3. #3
    VBAX Regular Andrew's Avatar
    Joined
    Jun 2004
    Location
    Nagoya, Japan
    Posts
    13
    Thanks CBrine for the code and the tip about looking in the help files (silly me)

Posting Permissions

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