Passing objects to procedures in VBA

后端 未结 1 1621
不知归路
不知归路 2020-12-12 05:29

I am working on a simple tool that will allow me to parse multiple CSV files and spit them out onto a fresh worksheet \"merged\" together. Here is my implementation (I\'ve

相关标签:
1条回答
  • 2020-12-12 06:20

    This line:

    tempC.A = A 
    

    means "assing to A property of tempC object the value of the default property of the A object."
    Your A object apparently doesn't have a default property.

    What you actually meant was probably:

    Set tempC.A = A 
    

    But even then, you can't access a private field A of C class from D class. Make the field public or create a public SetA() method on C class and call it from D.

    0 讨论(0)
提交回复
热议问题