Thread: Load Dll
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
merjet merjet is offline
external usenet poster
 
Posts: 812
Default Load Dll

You need to register the DLL if that hasn't been done.
Start | Run regsvr32 "C:\apps_pub\tn327080\ehllap32.dll"
In the VBA Editor, check it using menu Tools | References.
Declare and set an object of a public Class in the DLL, e.g.:
Dim myObj As MyDLL.Class1
Set myObj = New MyDLL.Class1
Call the function (with any required arguments):
y = myObj.Function1(x)

When done: Set myObj = Nothing

Hth,
Merjet