Cloning Objects in VBA?

前端 未结 3 1985
天命终不由人
天命终不由人 2020-12-16 17:31

Is there a generic way to clone objects in VBA? So that i could copy x to y instead of copying just the pointer?

  Dim x As New Class1
  Dim y As Class1

  x         


        
3条回答
  •  醉话见心
    2020-12-16 18:09

    I don't think there's anything built in, although it would be nice.

    I think there should at least be a way to create a Clone method automatically using the VBA Editor. I'll see if I can take a look at it once I've got the kids to bed...

提交回复
热议问题