Set a type in VBA to nothing?

后端 未结 7 1282
隐瞒了意图╮
隐瞒了意图╮ 2021-02-12 10:40

I have defined a variable with an own type, say

Dim point As DataPoint

Public Type DataPoint
   list as Collection
   name as String
   number as Integer
End Ty         


        
7条回答
  •  一向
    一向 (楼主)
    2021-02-12 11:15

    One-liner:

    Function resetDataPoint() As DataPoint: End Function
    

    Usage:

    point = resetDataPoint()
    

提交回复
热议问题