Microsoft KB Archive/59619

{| = Excel: Using a Macro to Change the Font in a Header =
 * width="100%"|

Last reviewed: November 2, 1994

Article ID: Q59619

SUMMARY
To change the font name in a header or footer through a macro, double sets of quotation marks (&quot;&quot;) must be included around the font name because Microsoft Excel's PAGE.SETUP function requires the actual quotation marks to be present.

For example, to set the font size to 24 points and the font to Helvetica with no footer, type the following command (where &quot;This is a Header in Helvetica&quot; is the header text):

=PAGE.SETUP(&quot;&24&&quot;&quot;Helvetica&quot;&quot;This is a Header in Helvetica&quot;,&quot;&quot;)

MORE INFORMATION
An alternative to using the double quotation marks is to concatenate a CHAR(34) (the quotation mark character) around the font name. For example:

=PAGE.SETUP(&quot;&24&&quot;&CHAR(34)&&quot;Helvetica&quot;&CHAR(34)&&quot;This is a Header  in Helvetica&quot;,&quot;&quot;) Fore more information on the PAGE.SETUP command function, see pages 173-175 in the &quot;Microsoft Excel Function Reference&quot; version 3.0 manual. If you are using Excel 2.20, see page 257 in the &quot;Microsoft Excel Function and Macros&quot; version 2.2 manual. For more information on quotation marks in a macro text string, query on the following words:

quotation and marks and text and string and macro
 * }