Late Bind to a COM Component with VB.NET
In VB6 you could use the CreateObject statement to
Late Bind to COM or ActiveX components dynamically at
runtime.
You can still do late binding to COM components in VB.NET:
Option Strict Off
Dim myObj As Object
Dim t As Type = Type.GetTypeFromProgID("Excel.Application", True)
myObj = Activator.CreateInstance(t)
myObj.Open...
myObj = Nothing
|
About TheScarms
Sample code version info
|