how to add an active X reference with code

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

i know its hard to believe but sometimes our access application mdb becomes corrupt and we have to start with a new empty mdb... we import what we can from the bad mdb and restore the rest from backups... we then have to MANUALLY add references to all of the activeX...

question: is there a way to add these references programmaticly

sincere thanks for your consideration.
sk
 
I haven't done it before, but I from the little that I
have read on the subject I think that the following
should be possible.

You can add references programmatically using the
AddFromFile and AddFromGUID methods of the References
object, such as:

Dim ref As Reference
Set ref = References!Access
ref.AddFromFile "C:\WINNT\system32\scrrun.dll"

You could also use the references object to loop through
all of your current references and store them in a table,
so that you will have the list when you need to restore
them later.

Hope that helps.

-Ted
-----Original Message-----
i know its hard to believe but sometimes our access
application mdb becomes corrupt and we have to start with
a new empty mdb... we import what we can from the bad mdb
and restore the rest from backups... we then have to
MANUALLY add references to all of the activeX...
 
Back
Top