Working with Range Objects

Much of the work that you will do in VBA involves cells and ranges in worksheets. The earlier discussion on relative versus absolute macro recording (see "Relative or absolute?") exposes you to working with cells in VBA, but you need to know a lot more.

A Range object is contained in a Worksheet object and consists of a single cell or range of cells on a single worksheet. In the sections that follow, I discuss three ways of referring to Range objects in your VBA code:

■ The Range property of a Worksheet or Range class object

■ The Cells property of a Worksheet object

■ The Offset property of a Range object

0 0

Post a comment