Page 202 - Excel Progamming Weekend Crash Course
P. 202

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




                  Session 14 — Formatting a Worksheet                                    177


                    RGB Color Definitions

                       The RGB color model defines a color in terms of the three primary colors: red,
                       green, and blue. You may remember from art class that the primaries are red,
                       blue, and yellow, so what gives? Red, blue, and yellow are the subtractive pri-
                       maries that are important when you are mixing paints. In contrast, red, green,
                       and blue are the additive primaries that apply when you are mixing light, as in
                       the light emitted by a computer monitor. With 255 possible levels for each of
                       the three primaries, this model allows for over 16 million distinct colors.
























                    Figure 14-3 Illustration of different horizontal and vertical alignment settings
                  To change alignment, use the following properties of the Range object:

                   HorizontalAlignment. Set to xlLeft, xlCenter, or xlRight.
                   VerticalAlignment. Set to xlTop, xlCenter, or xlBottom.


                          Excel’s default is to use bottom alignment for vertical position. Horizontally,
                          numbers are right-aligned, and text is left-aligned.
                   Tip
                  You can also change the orientation of text from the default horizontal to vertical or
               anything in between using the Range.Orientation property. Orientation is specified as
               degrees rotated counter-clockwise from the default horizontal orientation. For example, ori-
               entation of 90 degrees results in vertical text that reads from bottom to top. Permitted val-
               ues for orientation range from -90 to 90 degrees. Figure 14-4 shows examples of some
               orientation settings.
   197   198   199   200   201   202   203   204   205   206   207