Getting Error 91
Posted
by
user1695788
on Stack Overflow
See other posts from Stack Overflow
or by user1695788
Published on 2012-10-07T21:14:44Z
Indexed on
2012/10/08
3:37 UTC
Read the original article
Hit count: 72
excel-vba
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
© Stack Overflow or respective owner