Getting Error 91
- by user1695788
I have a general comprehension issue with classes and objects. What I'm trying to do is pretty simple but I'm getting errors. In the code example below, sometimes the line "Call tables.MethodInCTables" runs fine and sometimes it produces error 91, object not set. IN all cases, I can "see" the method in the type ahead so I know that the code recognizes the "tables" instance and "sees" MethodInCTables. But then I get the run-time error.
Sub MainSub()
Dim tables as New CTables
Call tables.MethodInCTables
End Sub
----Class Module = CTables
Sub MethodInCTables()
...do something
End Sub