Key Points


  • Use the Object Browser to find out what members-methods and properties-are available for an object, and what each method or property returns.

  • Avoid changing the selection during your macros. A macro runs faster and appears more professional if it doesn’t have to repaint the screen.

  • While debugging, use the Immediate window to test the current reference of a range object.

  • Many range-related functions start with one range and return another range. These functions are invaluable for navigating from one range to another. The most important one is CurrentRegion.

  • Always use R1C1 references when constructing formulas from macros, and take advantage of the many options-relative, absolute, internal, external-that the Address property gives you.

  • Use the Borders collection to simultaneously control the borders of each cell within a range. Use the BorderAround method to treat the range as a single unit.

  • Use either the RGB function or the enumerated list of RGB constants to select a color. To create smooth gradations of the shades and tints of a color, take advantage of the TintAndShade property.



Microsoft Office Excel 2007 Visual Basic for Applications Step by Step
Microsoft Excel 2002 Visual Basic for Applications Step by Step (Step by Step (Microsoft))
ISBN: 0735613591
EAN: 2147483647
Year: 2004
Pages: 99
Authors: Reed Jacobsen

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net