This project is read-only.

cControlChild_Event.Callbacks Property

Returns a collection of all of the callback functions registered with the event. Read-only Collection.



expression A variable that represents a cControlChild_Event object.


The Callbacks property returns a collection of registered callbacks. Each callback is stored in a Variant array indexed as follows:

Index Data Type Description
0 Object Reference to the parent object of the function. If callback is located in a standard module, this value is Nothing.
1 String Name of the callback function.
2 VbCallType Callback function class member type (VbGet, VbLet, VbSet, VbMethod)
3 intCallbackType Callback function general type (icbFunction, icbMethod)

Index 2 is only valid when the function is a class member (Index 3 = icbMethod).

Index 3 is used to indicate whether the callback is a member of a class module or a standard module.


This example retrieves the callback registry for an event handler object's OnClick event:

Dim v as Variant

'retrieve the array
v = MyEventHandler.OnClick.Callbacks

'check to see if the callback is a class member
If (v(3) = icbMethod) Then

    MsgBox "Function " & v(1) & " is a member of the object " & v(0).Name

End If


Last edited Dec 19, 2010 at 5:33 AM by vba_junkie, version 2


No comments yet.