Ask Your Question

object not accessible- invalid object refference [closed]

asked 2014-05-20 14:48:41 +0200

altair gravatar image

Hello! I wrote JUST this code in the sub:

 Dim a As Object
 Set a = New Point
 MsgBox a._X

But getting the error from above. Please, what is missing- in a sub?

Many thanks!

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Alex Kemp
close date 2016-02-23 04:21:15.822855

1 Answer

Sort by » oldest newest most voted

answered 2014-05-21 07:46:51 +0200

mahfiaz gravatar image

I'm pretty sure you found the code from here:

A more careful reading would have had you create a new module, just as in instructions:

If one enters above code in a module called « Point » the name of the class will be also « Point ».

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2014-05-20 14:48:41 +0200

Seen: 188 times

Last updated: May 21 '14