Announcement

Collapse
No announcement yet.

Setting font size in footer

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Setting font size in footer

    I am using a macro that asks for the date to put in a footer, as follows:

    datestring = InputBox("Enter date to be printed in footers." & Chr(13) & _
    "Leave blank if current date is to be used.", _
    "Set Up Footer Date")
    If Not datestring = "" Then
    Sheets("Pricing Summary").Select
    ActiveSheet.PageSetup.RightFooter = datestring
    End If

    How do I also specify the font (Arial) and font size (10) to use for this text?

    Thanks.

  • #2
    Here is the code:



    With Sheets("Pricing Summary").PageSetup
    .RightFooter = "&""Arial,Italic""&8Report Date:" & datestring
    end with

    Hope this will help you.

    Maqbool

    Comment


    • #3
      Try using the macro recorder to generate the necessary code. I tried it and got the following (not using your example exactly):

      Code:
      With ActiveSheet.PageSetup
           .LeftFooter = "&""Arial Black,Bold""&10hello"
      End With
      HTH
      <a href="http://www.mrexcel.com/relayforlife.shtml" target="new"><img src="http://www.myimgs.com/data/vonpookie/anne_relay.gif"></a>

      Comment


      • #4
        I finally figured it out, using:

        Sheets("Worksheet Name").Select
        ActiveSheet.PageSetup.RightFooter = "&""Arial""&12" & datestring

        Comment

        Working...
        X