Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating a reference with code ~Need help~
Message
General information
Forum:
Visual Basic
Category:
Windows API functions
Miscellaneous
Thread ID:
00274231
Message ID:
00274243
Views:
33
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform