Programming Reference Manual
 
Syntax
 
CallByName(Obj,ProcName,CallType,[expr[, ...]])
 
Description
Call an Obj's method/property, ProcName, by name. Pass the exprs to the method/property.
 
Parameter
Description
Obj
Call the method/property for this object reference.
ProcName
This string value is the name of the method/property to be called.
CallType
Type of method/property call. See table below.
expr
These expressions are passed to the obj's method/property.
 
CallType
Value
Description
vbMethod
1
Call or evaluate the method.
vbGet
2
Evaluate the property's value.
vbLet
4
Assign the property's value.
vbSet
8
Set the property's reference.
See Also
 
Example
 
Sub Main
    On Error Resume Next
    CallByName Err, "Raise", vbMethod, 1
    Debug.Print CallByName(Err, "Number", vbGet) ' 1
End Sub