Doing Things with Spreadsheet Ceils

When you are ready to write your own VBA procedure to automate a particular spreadsheet task, you will most likely begin searching for instructions that allow you to manipulate spreadsheet cells. You will need to know how to select cells, how to enter data in cells, how to assign range names, how to format cells, and how to move, copy, and delete cells. Although these tasks can be easily performed with the mouse or keyboard, mastering these techniques in Visual Basic for Applications requires a little practice.

You must use the Range object to refer to a single cell, a range of cells, a row, or a column. If you take a look at the Excel object model, you will notice that the Range object is a part of another larger object—the Worksheet object. There are three properties that allow you to access the Range object: the Range property, the Cells property, and the Offset property.

¿^¡Microsoft Visual Baste Help

Bl |i 1 j


Contents | Ans'/rer Wizaid | Inde« \

Microsoft Excel Objects (Worksheet) Z3

l?] Microsoft EkceI Ob Ltl A VhötV: Ne'/I —1

See Also

[ü Fïogrammng Cane Fl IjJ Obiects ffijA

1 1 Worksheets (Worksheet) |

■^jrsames (Name)

lïi B C jkJ

HRange 1 w |

"1 H

The Range object in the Excel object model

Figure 2-25:

The Range object in the Excel object model

0 0

Post a comment