-
Including or Referencing a Module from other Workbooks
Good Day All!
I have had a lot of good luck with you experts, so I am going to take another shot here:
I can't seem to "reference..." an extra Module I wrote. This particular module is indeed accessible through other modules within the same active worksheet, through the object.method approach. I simply wrote a group of functions which I found myself rewriting time and time again. Now I have them available in a centralised location (like an #include file). How do I easily reference this module?
I was also interested in finding out whether or not I could develop a DLL in Delphi (my strong suit IDE) which I could then somehow include/reference from several separate VBA Projects. Is calling exterrnal DLL functions possible in VBA?
Thanks!
Deyken
DeezineTek
South Africa
-
I believe the syntax is
Workbookname!Module.Function
With 'Module' being optional if the function name is unique.
Note that if you set a reference to the workbook (using Tools > References in the VB IDE) you don't need to qualify the function name with the Workbook name.
Also, you could put those common functions into a separate workbook, save the workbook as an add-in and install it, and you could use them that way (also without qualifying them with the workbook name).
As for your question about DLLs and Delphi, I'm afraid that's beyond me.
-
Hi JP2112,
Thanks a lot. Could I use the "Save As..." function in Excel to save a workbook as an add-in? How do I go about installing it?
Look forward to your reply!
Deyken
DeezineTek
South Africa
-
-
Deyken
DeezineTek
South Africa
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules