PC Review


Reply
Thread Tools Rate Thread

how to add an active X reference with code

 
 
=?Utf-8?B?c2s=?=
Guest
Posts: n/a
 
      4th Feb 2004
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
 
Reply With Quote
 
 
 
 
Ted
Guest
Posts: n/a
 
      5th Feb 2004
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...
>
>question: is there a way to add these references

programmaticly?
>
>sincere thanks for your consideration..
>sk
>.
>

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
add reference to project vs. add reference to compiled code (dll orexe) GiJeet Microsoft C# .NET 3 30th Oct 2008 08:56 PM
Reference and tutorials using/calling native code (dll) from managed code app Mario Microsoft Dot NET Compact Framework 2 2nd Aug 2006 05:06 PM
Reference.map(1): Custom tool warning: DiscoCodeGenerator unable to initialize code generator. No code generated. genc ymeri Microsoft ASP .NET 0 27th Apr 2006 04:28 PM
Reference.map(1): Custom tool warning: DiscoCodeGenerator unable to initialize code generator. No code generated. genc ymeri Microsoft C# .NET 0 27th Apr 2006 04:28 PM
Altering code to reference the worksheet before the active worksheet KimberlyC Microsoft Excel Programming 8 15th Mar 2005 10:26 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:22 PM.