# OnActivateTab

The **OnActivateTab** event can be implemented by a [script add-in](../../../scripting/script_add-ins) to receive a notification every time a tab becomes active (i.e. comes to the front of another tab in the same file display).

| **Method Name:**   | OnActivateTab                                                                                                                                     |
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Argument Type:** | [**ActivateTabData**](../scripting_objects/activatetabdata)                                                                                       |
| **Return Type:**   | _none_                                                                                                                                            |
| **Description:**   | The **ActivateTabData.oldtab** property identifies the tab that was previously active, and the **newtab** property identifies the new active tab. |
