# HeaderFooterActivated Event

> Occurs when a header or footer of the TXTextControl has been activated and passes its kind: header, footer, first page or even page; sets SectionCurrent.

- **Product:** TX Text Control ActiveX
- **Section:** Documentation
- **Kind:** Event
- **Path:** TX Text Control ActiveX > API Reference > TXTextControl > HeaderFooterActivated Event
- **345 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/headerfooteractivated-event/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/headerfooteractivated-event/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/headerfooteractivated-event/llms-full.txt

---

Occurs when a header or footer has been activated. The [SectionCurrent](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/sectioncurrent-property/llms-full.txt) property receives the number of the section to which the header or footer belongs.

### Syntax

```vbscript
HeaderFooterActivated(HeaderFooter)
```

### Parameters

| Parameter | Description |
|---|---|
| HeaderFooter | Specifies the header or footer that has been activated. Valid values are listed in Constants. |

### Constants

Valid values for the HeaderFooter parameter are:

| Constant | Description |
|---|---|
| txHeader (1) | A header has been activated. It is the odd header, when an even header exists. |
| txFirstHeader (2) | The special header for the first page has been activated. |
| txFooter (4) | A footer has been activated. It is the odd footer, when an even footer exists. |
| txFirstFooter (8) | The special footer for the first page has been activated. |
| txEvenHeader (128) | An even header has been activated. |
| txEvenFooter (256) | An even footer has been activated. |

### Data Types

| Name | Data type |
|---|---|
| HeaderFooter | Integer |

### See Also

- [Headers and Footers](https://docs.textcontrol.com/tx-text-control-activex/document-editor/headers-footers/llms-full.txt)
- [HeaderFooterDeactivated Event](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/headerfooterdeactivated-event/llms-full.txt)
- [Programming Category: Headers and Footers](https://docs.textcontrol.com/tx-text-control-activex/reference/categories/headers-footers/llms-full.txt)

---

## Nearby

- **Previous:** [HeaderFooterActivate Method](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/headerfooteractivate-method/llms-full.txt)
- **Next:** [HeaderFooterAtInputPos Property](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/headerfooteratinputpos-property/llms-full.txt)
