Please, do not post tangents about whether today's goal is good, bad, fast, slow, brilliant or stupid. I already had a bunch of those tangents
here. Strangely enough, that long winded discussion never mentioned createobject("
New:{1C3B4210-F441-11CE-B9EA-00
AA006B1A69
}") which I now believe might be a very useful construction.
My goal is to make vba code more portable by switching from early binding to late binding. I wanted to do this for ARBITRARY object types while keeping the object's methods and properties unchanged.
For instance let us say I want to switch the following code to late binding.
Dim x as dataobject ' reference to ms forms 2.0 object library which on my machine is c:\windows\syswow64\fm20.d
ll
set x = new dataobject
I
accidentally found a webpage that showed the following alternative.
dim x as object
Set x = CreateObject("New:{1C3B421
0-F441-11C
E-B9EA-00A
A006B1A69}
")
How can
intentionally find similar classids? For instance, can I transform the following
dim x as new SHDocVw.ShellWindows
Our community of experts have been thoroughly vetted for their expertise and industry experience.
The Distinguished Expert awards are presented to the top veteran and rookie experts to earn the most points in the top 50 topics.