CallByName Instruction
Syntax
CallByName(Obj, ProcName, CallType, [expr[, ...]])
Group
Description
Call an Obj's method/property, ProcName, by name. Pass the exprs to the method/property.
Parameters |
Description |
Call the method/property for this object reference. |
|
This string value is the name of the method/property to be called. |
|
Type of method/property call. See table below. |
|
These expressions are passed to the obj's method/property. |
CallType |
Value |
Effect |
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. |
Example
Sub Main
On Error Resume Next
CallByName Err, "Raise", vbMethod, 1
Debug.Print CallByName(Err, "Number", vbGet) ' 1
End Sub