Jaafar Tribak
Well-known Member
- Joined
- Dec 5, 2002
- Messages
- 9,806
- Office Version
- 2016
- Platform
- Windows
I instatiate a class Object and then I reset the vb project .Obviously, the result is that the Class instance is destroyed.
Is there a workaround this so I can preserve the Class instance even after resetting the vb project?
After resetting the Project the code below errors out :
Is there a workaround this so I can preserve the Class instance even after resetting the vb project?
Code:
Private oClass1 As Class1
Sub InstantiateClass()
Set oClass1 = New Class1
oClass1.SomeProperty = "bla bla"
MsgBox oClass1.SomeProperty
End Sub
Code:
Sub MacroAFterResettingtheProject()
MsgBox oClass1.SomeProperty
End Sub