excel - How to return object to UiPath in VBA?
问题描述
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.
解决方案
推荐阅读
- php - magento 2.3 后端中的自定义字段并在前端可见
- android - 引起:java.lang.NoSuchMethodError: No static method listOf(Ljava/lang/Object;)Ljava/util/List; 在 Lk/v/i 级;或其超类
- pandas - 在 DataFrame 中跨行绘制多列
- ethereum - Solidity中的HashSet数据结构
- ios - 自定义视图 UIView 的 AddTarget 不起作用
- javascript - 使用 addEventListener 单击图像时如何显示图像的文件名?
- sql - Oracle SQL 效率
- ms-access - 一对多关系翻转
- python - 具有不均匀间隙的 Python 范围
- python - 按键打印单词(对于 Python)