Because if you aren't getting answers in one forum it is good to ask in others but cross-posting is not a good practice. It is always suggested to just post the link so multiple people do not give the same answers.
How did I over complicate it? I called an object and initialized some properties. Then later in a second click event I tried to use those properties and the object is no longer in memory. If it is too complicated, tell me how you would have done it differently. I am here to learn.
1. You have a custom class and instantiate it in the form click event
Code:
Public this_renewal As Renewal
Private Sub cmdMA_Click()
Set this_renewal = Factory.CreateRenewal(cMA)
'other code here
End Sub
we know that the class instantiates without problem. But when you try to reference it again you get an object variable not set.
2. We then try to use the instantiated object later but you get that it is not set.
Code:
Private Sub cmdImport_Click()
strTableName = this_renewal.Table
End Sub
Before we start chasing our tails. "This_renewal" is declared and used in the same form module, and you are confident the below line is causing the error?