Creating Self-Referencing ActiveX Event Scripts
- Last UpdatedMar 10, 2017
- 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 re-used. 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.
To create self-referencing ActiveX event scripts
-
Create an ActiveX event script for a specific ActiveX event. See Creating ActiveX Event Scripts.
-
In the ActiveX Event Script dialog box, click Insert, and then click ActiveX. The ActiveX Control Browser dialog box appears.

-
In the left pane, do one of the following:
-
Click ThisControl to see properties and methods that you can use in connection with this control (and any other control that you re-use this script in).
-
Click 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, click one of the properties or methods and click OK. The selected property or method is pasted to the script window.
-
Configure the script.
-
Click OK.
For example, this statement writes the value of the ClicknRow event parameter to the ClickedRow tag:
ClickedRow = ThisEvent.ClicknRow;