I was experimenting to see if I really needed a fully qualified Assembly name for CreateNew2.
I can successfully make a DirectoryInfo object and invoke a method using just the assembly name for mscorlib.
Code:
ofrm.CreateNew2("System.IO.DirectoryInfo,mscorlib", args.Value)
Msgbox(ofrm.RunMethod("ToString"))
But if I try, slightly modified from a sample
Code:
oIcon.CreateNew2("System.Drawing.Icon,System.Drawing", args.Value)
I get a "Could not load file or assembly 'System.Drawing" error. Any idea why the difference Erel?
EDIT :- Note that, undocumented in Erel's first post, you do get the return value of a RunMethod call - I'll wait and see what happens for some of the more esoteric returned objects
