Edit

Share via


Range.Cells property (Word)

Returns a Cells collection that represents the table cells in a range. Read-only.

Syntax

expression.Cells

expression A variable that represents a Range object.

Remarks

For information about returning a single member of a collection, see Returning an object from a collection.

Example

This example creates a 3x3 table and assigns a sequential cell number to each cell in the table.

Set newDoc = Documents.Add 
Set myTable = newDoc.Tables.Add(Selection.Range, 3, 3) 
i = 1 
For Each c In myTable.Range.Cells 
 c.Range.InsertAfter "Cell " & i 
 i = i + 1 
Next c

See also

Range Object

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.