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

后端 未结 5 1722
不知归路
不知归路 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 20:14

    Dim v As Variant
    For Each v In Array(SomeMethod())
        Exit For 'Needed for v to retain it's value
    Next v
    'Use v here - v is now holding a value or a reference
    

提交回复
热议问题