Page 206 - Excel Progamming Weekend Crash Course
P. 206

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




                  Session 14 — Formatting a Worksheet                                    181






















                    Figure 14-5 A table that has been formatted with the program in Listing 14-5


               Cell Backgrounds
               By default, all cells in an Excel worksheet have a white background. You can change a cell’s
               background to a different color, and also display a background pattern. The background of a
               cell or range is represented by the Interior object. This object has properties that deter-
               mine its color and pattern, as described in Table 14-5.


               Table 14-5  Properties of the Interior Object Control a Cell’s Background
               Property       Description                  Settings
               Color          The color of the background  An RGB value (as described earlier in
                                                           this session)
               Pattern        The pattern displayed        A constant specifying the pattern.
                                                           Permitted values include
                                                           xlPatternChecker, xlPatternDown,
                                                           xlPatternHorizontal,
                                                           xlPatternVertical, and
                                                           xlPatternNone
               PatternColor   The color of the pattern (if any) An RGB value; the default is black



                          While Cell Protection is found in Excel’s Format Cells dialog box, it is really
                          an aspect of worksheet security rather than formatting. For this reason it is
                 Cross-Ref  covered in Session 24.

                          Different color backgrounds can make a worksheet easier to read. You can use
                          backgrounds to differentiate table headings from table data, for example.
                  Note
   201   202   203   204   205   206   207   208   209   210   211