# TableSelectCells Method

> Selects a rectangular range of table cells from a top-left to a bottom-right cell by table identifier and row and column numbers; returns True or False.

- **Product:** TX Text Control ActiveX
- **Section:** Documentation
- **Kind:** Method
- **Path:** TX Text Control ActiveX > API Reference > TXTextControl > TableSelectCells Method
- **430 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/tableselectcells-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/tableselectcells-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/tableselectcells-method/llms-full.txt

---

This method can be used to select a rectangular part of a table defined through two table cells. To select a single cell, row, column or a whole table, use the [TableCellSelect](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/tablecellselect-method/llms-full.txt) method.

Introduced: 21.0.

### Syntax

```vbscript
TXTextControl.TableSelectCells TableId, StartRow, StartColumn, EndRow, EndColumn
```

### Parameters

| Parameter | Description |
|---|---|
| TableId | Specifies the table's identifier. This must be the value returned from the [TableInsert](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/tableinsert-method/llms-full.txt) or the [TableInsertDialog](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/tableinsertdialog-method/llms-full.txt) method. |
| StartRow | Specifies the row number of the top-left table cell. The first row has the number one. |
| StartColumn | Specifies the column number of the top-left table cell. The first column has the number one. |
| EndRow | Specifies the row number of the bottom-right table cell. |
| EndColumn | Specifies the column number of the bottom-right table cell. |

### Return Value

The return value is True, if the specified table cells could be selected. Otherwise, it is False. False is returned, if the specified table id is invalid or the specified row and/or column numbers do not exist.

### Data Types

| Name | Data type |
|---|---|
| TableId | Integer |
| StartRow | Long |
| StartColumn | Long |
| EndRow | Long |
| EndColumn | Long |
| Return value | Boolean |

### See Also

- [Formatting Text by using Number Formats](https://docs.textcontrol.com/tx-text-control-activex/document-editor/tables/number-formats/llms-full.txt)
- [Tables](https://docs.textcontrol.com/tx-text-control-activex/document-editor/tables/llms-full.txt)
- [Using Formulas in Table Cells](https://docs.textcontrol.com/tx-text-control-activex/document-editor/tables/formulas/llms-full.txt)
- [Programming Category: Tables](https://docs.textcontrol.com/tx-text-control-activex/reference/categories/tables/llms-full.txt)

---

## Nearby

- **Previous:** [TableRows Property](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/tablerows-property/llms-full.txt)
- **Next:** [TableSplit Method](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/tablesplit-method/llms-full.txt)
