General

6.10 Running Your VB 5.0 Library in Access 97.
  Pat Tormey, FourSquare Solutions Inc. of Derry, New Hampshire US.
Did you know that you can build your library functions in Visual Basic 5.0 and use them in Access, Excel or any VBA?
Well you can! One library across all VBA platforms. Here's how:
1. Build your library as an ActiveX DLL in VB 5.0.
2. Make each Function or Sub Public in class module.
3. Comment them using the Browser because users never see the actual code!
  <F2> Select MYLIB select each procedure and right click properties!
4. Set its Instancing Property to "6 Global Multiuse".
5. Compile to a DLL.
6. And set a reference in your VBA Application.
Presto! You now have a single library that can be called by all VBA applications!

Couple of things to remember:
  - You can only use VB Code in a VB Class so you can't use DoCmd or any other Access specific calls.
  - Global Multiuse adds the actual public function names directly to the environment. You have to set a reference, but you don't have to dimension any variables for it. Be sure to watch out for naming conflicts. VBA uses the library preference order to choose which function to call by default. You can also call it explicitly with MyLib.MyFunction().
  - You will have to distribute the DLL, not the source though, with the application. Use the VB Setup tools since VB DLLs also needs the VB runtime library installed and registered.
  - Unfortunately it seems that you can't call the Library from outside VBA without a local wrapper function. So, it can't be called in a Query or a Cell of a spreadsheet unless a local function runs it.


Se pensate di avere del materiale freeware interessante e volete pubblicarlo, allora leggete qui.