I am trying to return an object from function Find123. I have called it from sub procedure Retrieve123.
When I comple it says function not defined and it highlights the CObj method.
Could you tell me a way to convert integer or string into object and return it in VBA?
Sub Retrieve123() Call Find123() End Sub Function Find123()As Object Dim val As String val="100" Dim obj As Object Set obj=CObj(val) Set Find123 = obj End Function
This is how I get the error message
When I assign the string value into the function it gives this type mismatch error.
I need to convert the string into object because in UiPath we can only return type object as the Invoke VBA activity's output is object type.