VBA object destruction - memory error

前端 未结 2 810
小蘑菇
小蘑菇 2021-02-10 12:59

I have an class object that I create, with references to other classes (none of the other classes reference each other). I am having a memory issue that gives the \'out of memo

2条回答
  •  梦毁少年i
    2021-02-10 13:20

    Try using End keyword

    Sub Test1()
    
    Dim zwell As aclsWell
    
    For i = 1 To 2000
    Set zwell = New aclsWell
    Set zWell = Nothing
    
    Next i
    End
    End sub
    

提交回复
热议问题