Generic vb code

J

John Webb via AccessMonster.com

Laurel,

I believe you can write VBA with vba, so to that end I suppose you could
first export your generic module to a location that all your databases will
have access to. Then write a small module that opened this file and write
it to a new module. Add this bit of code to your startup routine and
hopefully it should work.

However, there can be many things that could go wrong with it - your users
might not have access rights to your generic module, a user that does might
change it without realising what it is - and probably a whole host of other
issues.

My recommendation would be simply to export it to someplace you can
acccess, and import it to each database you wish to use it with.

I realise this is not an elegant solution - if in fact it can be called a
solution, but short of writing your own library and then referencing that,
I don't know what else to suggest.

Cheers

John Webb
 
A

Albert D. Kallal

Laurel said:
How can I make vb code (a module) available to multiple databases?

You can compile your code into a mde. Once you do this, then you can use
tools->references to add a reference to the mde. Now, all code from that mde
can be used. So, you can in effect do this. The advantages are many, since
if you update the mde, then all of your existing programs that use this
library code are have the "new" code instantly available.

However, if you mode the location of the mde file, then your applcation(s)
will now break.

Broken refs are a source of much pain for developers. So, right now, I do
NOT use mde library files yet, and simply just import the ocde. it certainly
makes maintenance a bit harder..but you do get more reliability...and more
ease of distribution when you advoied "extra" references.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top