![]() |
Programatically set ref to my DLL
I wrote a very simple ActiveX DLL (in VB6) with a function in
"globalmultiuse" class module. I can call the function in a module in Excel if I make a manua "reference" to it in the VBA References dialog window. 1. Is there a way to either call the function directly using th declare - lib approach? 2. Or can I set the "references" up programatically in a module i Excel (instead of thru the VBA references editor dialog)? My intention is to create a set of routines for my company that I ca distribute to customers (but I don't want the working code to b visible as in an Excel module). I also want to make it as painless o the user as possible which is the reason for my questions above... Thanks for any help, Ric -- Message posted from http://www.ExcelForum.com |
Programatically set ref to my DLL
I wrote a very simple ActiveX DLL (in VB6) with a function in a
"globalmultiuse" class module. I can call the function in a module in Excel if I make a manual "reference" to it in the VBA References dialog window. 1. Is there a way to either call the function directly using the declare - lib approach? 2. Or can I set the "references" up programatically in a module in Excel (instead of thru the VBA references editor dialog)? My intention is to create a set of routines for my company that I can distribute to customers (but I don't want the working code to be visible as in an Excel module). I also want to make it as painless on the user as possible which is the reason for my questions above... Thanks for any help, Rick --- Message posted from http://www.ExcelForum.com/ You should be able to use late binding with the dll, which should be more bullet proof. Something like Dim MyClass As Object Set MyClass = CreateObject("MyDll.MyClass") you can search the registry for your dll to see the correct syntax for your dll. -- Regards, Juan Pablo González |
Programatically set ref to my DLL
Thanks Jaun,
that did the trick. I appreciate the help, Ric -- Message posted from http://www.ExcelForum.com |
All times are GMT +1. The time now is 08:27 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com