-
I have re-read your original post and I still don't think I get it, but let's try to clarify.
Are you saying that you have a global variable that holds a class instance, and you want to call a method within the currently refrenced class? If so, isn't it as simple
[vba]
Dim glb_oRiskCache As Object
Set glb_oRiskCache = New Class1
MsgBox glb_oRiskCache.MyMethod
Set glb_oRiskCache = New Class2
MsgBox glb_oRiskCache.MyMethod
[/vba]
as an example.
Wherever you are identifying glb_oRiskCache (as a string presumably) you could create the class instance there and then.
Another alternative is to create a collection class for the classses.
Last edited by Bob Phillips; 02-28-2007 at 05:16 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules