>I need to create a reference to a registered dll object with code. The issue is that I have two very similar libraries with internal structure duplication so I cant use the project/reference -> Object method. I need to be able to switch from one to the other at runtime.
>
Declare a variable as an object and use the CreateObject statement like this:
Dim x As Object
If Condition1 Then
Set x = CreateObject("DLL1")
Else
Set x = CreateObject("DLL2")
End If
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com