# TableFromSelection Method

> Returns the identifier of the selected table and copies the selected row and column numbers into two variables; zero for several rows, columns or tables.

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

---

This method returns the table identifier of the currently selected table. It is zero, if no table or more than one table is selected.

Introduced: 19.0.

### Syntax

```vbscript
TXTextControl.TableFromSelection Row, Column
```

### Parameters

| Parameter | Description |
|---|---|
| Row | TextControl copies the number of the selected row to this variable. The first row has the number one. If more than one row is selected, the row number is 0. |
| Column | TextControl copies the number of the selected column to this variable. The first column has the number one. If more than one column is selected, the column number is 0. |

### Return Value

The return value is 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) method. The return value is 0, if no table or more than one table is selected.

### Data Types

| Name | Data type |
|---|---|
| Row | Long |
| Column | Long |
| Return value | Integer |

### 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:** [TableFormatChanged Event](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/tableformatchanged-event/llms-full.txt)
- **Next:** [TableGetOuter Method](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/tablegetouter-method/llms-full.txt)
