How can I assign a Variant to a Variant in VBA?

后端 未结 5 1723
不知归路
不知归路 2020-12-05 19:45

(Warning: Although it might look like one at first glance, this is not a beginner-level question. If you are familiar with the phrase \"Let coercion\" o

5条回答
  •  再見小時候
    2020-12-05 19:59

    Dim v As Variant
    Dim a As Variant
    a = Array(SomeMethod())
    If IsObject(a(0)) Then
        Set v = a(0)
    Else
        v = a(0)
    End If
    

提交回复
热议问题