Is there a way in VB 6 (and VB 2005) to get the instance name from a class.
For example
class MyClass
'some methods and properties
public property get VarName() as string
VarName = somefunction(me)
end property
end class
dim myVar as MyClass
Set myVar = new MyClass
debug.print myVar.VarName
The output would be "myVar"
The TypeName() function returns the name of the class itself, in this case
"MyClass". What I'm looking for is a class internal method that will return
the name of the instance variable.
Thanks,
Mike Ober.