# TableNext Method

> Enumerates all tables of the text, in linked Text Controls too, by enumeration number and copies each table's identifier to the TableId parameter.

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

---

This method returns an enumeration number of the table that follows the specified table in the Text Control's current text. It can be used to enumerate all tables. In a list of linked Text Controls the search is performed in all controls. The method uses enumeration numbers instead of table identifiers because table identifiers are not unique. The corresponding table identifier is retrieved by the TableId parameter.

### Syntax

```vbscript
TXTextControl.TableNext EnumerationNumber, TableId
```

### Parameters

| Parameter | Description |
|---|---|
| EnumerationNumber | Specifies an enumeration number. The method returns the enumeration number of the table that follows the table with this number. If this parameter is zero, the first table's enumeration number is returned. |
| TableId | Text Control copies the table's identifier to this variable. This is the same value as returned from the [TableInsert](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/tableinsert-method/llms-full.txt) method. |

### Return Value

Specifies the enumeration number of the next table. It can be used for the next TableNext call. The return value is zero when the last table has been reached or when the specified enumeration number was invalid.

### Data Types

| Name | Data type |
|---|---|
| EnumerationNumber | Integer |
| TableId | Integer |
| 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:** [TableNestedLevel Property](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/tablenestedlevel-property/llms-full.txt)
- **Next:** [TableOfContentsCreated Event](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/tableofcontentscreated-event/llms-full.txt)
