Sharing VB Classes with Other Databases

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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?
 
Back
Top