Document object, Shape object
Represents a collection event handling scripts has been provided for all shapes, documents, and Dashboard section with event handlers.
The EventScripts collection has a read-only Count property (the collection contains 1.Count EventScript objects) and an Item method which can return a reference to an EventScript object given an event name or 1-based index number.
This example shows how to write the number of event handling scripts for commandbutton 1:
Console.Writeln(CommandButton1.EventScripts.Count)
Item(Value as Name of Index)
Read only: Count as Number
EventScript object