Sharing VB Classes with Other Databases

G

Guest

Hi -

I have two Access databases (DB1 and DB2). DB2 has VB classes and tables
that I'd like to use in DB1. How can I share Classes across databases?

I tried instantiating DB2 from DB1.

Dim accDB2 as Access.Application
set accDB2 = CreateObject("Access.Application")

accDB2.ApplicationOpenDatabase "C:\DB2.mdb", false

but when I instantiate the class (in DB2) an error occurs:

Dim cList as clsList
set cList = new clsList

Error => "User defined type not defined"

Any suggests?

Thank you, Mark
 
G

Guest

Thanks Alex.

Can youwalk me through the process of adding references?

I'm familiar with setting references to for objects such as DAO 3.6. Is
this what you mean?

Is this done programatically or manually via Access?
 

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