|
-
Mar 30th, 2002, 10:59 AM
#1
Thread Starter
New Member
Invoking Methods at Runtime?
Hi,
I need to be able to create and call a method of a COM component dynamically at runtime.
E.g...
If a user enters the string "Cpn1" as the name of a component, "Cls1" as the name of a class within that component and "Mth1" as a method of that class, how can I create and invoke the method at runtime.
If I knew the requirements at design time I could write the following...
Dim objCls1 as Cpn1.Cls1
set objCls1 = New Cpn1.Cls1
objCls1.Mth1
set objCls1 = Nothing
At runtime however, while I can declare the object "As Object" and create it using 'CreateObject("Cpn1.Cls1")', I haven't a clue as to how to invoke the "Mth1" method.
Can it be done?
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
|
Click Here to Expand Forum to Full Width
|