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.

  • 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>

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!