6.1.2.8.1.1 CallByName
Function Declaration
-
Function CallByName(Object As Object, ProcName As String, CallType As VbCallType, Args() As Variant)
Parameter |
Description |
---|---|
Object |
Object containing the object on which the function will be executed. |
ProcName |
String containing the name of a property or method of the object. |
CallType |
A constant of type vbCallType representing the type of procedure being called. |
Args() |
Variant array containing arguments to be passed to the method. |
Runtime Semantics.
§ The CallByName function is used to get or set a property, or invoke a method at run time using a string name, based on the value of the CallType argument:
Constant |
Value |
Action |
---|---|---|
vbGet |
2 |
Property Get |
vbLet |
4 |
Property Let |
vbMethod |
1 |
Method invocation |
vbSet |
8 |
Property Set |
§ If CallType has the value vbSet, the last argument in the Args array represents the value to set.