VBA Excel: Compile Error: Object required?

前端 未结 2 1360
死守一世寂寞
死守一世寂寞 2021-02-13 18:26

I get a VBA Excel \'Compiler Error: Object required\'-Error in the marked line. I do not understand the reason.

BTW: Wish Excel would support a .Net language without wr

2条回答
  •  一个人的身影
    2021-02-13 18:48

    Set is for the assignment of objects, a user defined type is treated like a regular variable so use = to assign.

    Also (confusingly); Dim Data, refData As Inherit only declares refData of type Inherit to declare them both on one line you must; Dim Data As Inherit, refData As Inherit

提交回复
热议问题