Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 226
Default 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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Programatically set ref to my DLL

Thanks Jaun,

that did the trick.

I appreciate the help,
Ric

--
Message posted from http://www.ExcelForum.com

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to programatically control a 3D-sum? Ake Excel Worksheet Functions 6 February 2nd 06 09:20 AM
Removing VBA Code (programatically) Marnie R Excel Programming 1 February 13th 04 01:02 AM
Positioning the cursor programatically Jeff Smith[_2_] Excel Programming 1 November 3rd 03 01:36 AM
Altering UI Programatically Alan Greenwood Excel Programming 2 November 1st 03 05:43 PM
Rename a Range, programatically? plh[_2_] Excel Programming 0 September 4th 03 05:11 PM


All times are GMT +1. The time now is 09:37 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"