Create self-referencing ActiveX event scripts
- Last UpdatedApr 09, 2025
- 2 minute read
If you use ActiveX event scripts, you can configure them to reference themselves instead of an absolute ActiveX control name. This is useful when you create ActiveX event scripts that will be reused. ActiveX event scripts can either:
-
Reference the specific ActiveX control that produced the event (ThisControl).
-
Reference the specific event that called the script (ThisEvent).
Referencing the specific event enables the ActiveX control to pass other parameters to the ActiveX control script.
Create self-referencing ActiveX event scripts
-
Create an ActiveX event script for a specific ActiveX event. See Create ActiveX event scripts.
-
In the ActiveX Event Script dialog box, choose Insert, and then select ActiveX. The ActiveX Control Browser dialog box appears.

-
In the left pane, do one of the following:
-
Select ThisControl to see properties and methods that you can use in connection with this control (and any other control that you reuse this script in).
-
Select ThisEvent to see properties and methods of the ActiveX control that you can use in connection with the self-referencing event.
-
-
In the right pane, highlight one of the properties or methods and select OK. The selected property or method is pasted to the script window.
-
Configure the script.
-
Select OK.
For example, this statement writes the value of the ClicknRow event parameter to the ClickedRow tag:
ClickedRow = ThisEvent.ClicknRow;