# CommentNext Method

> Returns the identifier of the comment that follows the given one, or of the first comment for 0, to enumerate all comments and their replies in the text.

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

---

This method returns the identifier of the comment that follows the specified comment in the Text Control's current text. It can be used to find the next comment in the text or to enumerate all comments. All replies of a comment immediately follow the replied comment.

Introduced: 30.0.

### Syntax

```vbscript
TXTextControl.CommentNext CommentId
```

### Parameters

| Parameter | Description |
|---|---|
| CommentId | Specifies a comment identifier. If this parameter is zero, the identifier of the first comment is returned. |

### Return Value

The method returns the identifier of the comment that follows the specified comment. It returns zero when there is no following comment.

### Data Types

| Name | Data type |
|---|---|
| CommentId | Long |
| Return value | Long |

### See Also

- [Programming Category: Commenting a document](https://docs.textcontrol.com/tx-text-control-activex/reference/categories/comments/llms-full.txt)

---

## Nearby

- **Previous:** [CommentInsert Method](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/commentinsert-method/llms-full.txt)
- **Next:** [CommentReplies Property](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/commentreplies-property/llms-full.txt)
