Page 200 - Excel Progamming Weekend Crash Course
P. 200

k540629 ch14.qxd  9/2/03  9:34 AM  Page 175




                  Session 14 — Formatting a Worksheet                                    175

               Font Formatting

               Excel provides complete control over the font used to display data in worksheet cells. The
               aspects of formatting that you can control are as follows:

                   The style, or face, of the font
                   The size of the font
                   Use of italics, boldface, and underlining
                   Special effects such as strikethrough, superscript, and subscript
                  When working in Excel, you use the Font tab in the Format Cells dialog box (shown in
               Figure 14-2) to make changes. In VBA, you control the display font by means of the Font
               object. This object has a set of properties that correspond to various aspects of the font’s
               appearance. They are described in Table 14-2.





















                    Figure 14-2 The Font tab of the Format Cells dialog box


               Table 14-2  Properties of the Font Object
               Property         Description
               Name             The name of the font (its typeface)

               Color            The color of the font, as an RGB value
               Size             The vertical size of the font, in points (1 point = 1/72 inch; Excel’s
                                default font is 10 points)
               Bold             True/False value specifying whether the font is boldface
               Italic           True/False value specifying whether the font is italic

                                                                                      Continued
   195   196   197   198   199   200   201   202   203   204   205