Excel: Using a Macro to Change the Font in a HeaderLast reviewed: November 2, 1994Article ID: Q59619 |
SUMMARYTo change the font name in a header or footer through a macro, double sets of quotation marks ("") 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 "This is a Header in Helvetica" is the header text):
=PAGE.SETUP("&24&""Helvetica""This is a Header in Helvetica","") MORE INFORMATIONAn 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("&24&"&CHAR(34)&"Helvetica"&CHAR(34)&"This is a Header in Helvetica","")Fore more information on the PAGE.SETUP command function, see pages 173-175 in the "Microsoft Excel Function Reference" version 3.0 manual. If you are using Excel 2.20, see page 257 in the "Microsoft Excel Function and Macros" 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 |
KBCategory: kbother
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |