CALLBYNAME |
CALLBYNAME(object, procname, calltype [,args]) |
Returns, sets or executes a method or property of an object (Variant). |
object | The object name which the function will be executed on (Object). |
procname | The name of a property or method of the object (String). |
calltype | A vbCallType constant that specifies the type of procedure being called: vbGet vbLet vbMethod vbSet |
args | (Optional) The array of possible arguments (Array). |
REMARKS |
* This only works with class objects. * If your code is not in a class then you can use Application.Run. * This function is used to get or set a property, or invoke a method at run time using a string name. * The equivalent .NET function is Microsoft.VisualBasic.Interaction.CallByName * For the Microsoft documentation refer to learn.microsoft.com |
CallByName "txtName1", "MousePointer", vbLet, vbCrosshair
Call CallByName("txtName1", "MousePointer", vbLet, vbCrosshair)
vResult = CallByName("txtName1", "MousePointer", vbGet)
CallByName "txtName1", "Move", vbMethod, 100, 100
© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited Top