Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Programatically Control References

Status
Not open for further replies.

Savil

Programmer
Apr 28, 2003
333
EU
Hi All
Access 97 db with vba references to visio 2002!

Some of our 200+ workstations have visio installed and others do not so I am getting 'cannot find library' type errors. How can you remove missing references or add references programatically depending on the software configuration of the machine? These workstations are in the public sector and I have no control over registries.

Thanks
 
This might be a point in the right direction for you:

You could also check to see if the visio file is present, if so, execute code, if not, then not. Check on File I/O in help.

Hope this helps you.

"If it's stupid but works, it isn't stupid."
-Murphy's Military Laws
 
What I have done in similar situations is use late binding to the library that is not guaranteed to be on all computers. I.e. I don't include it in references, but use CreateObject to instatiate the top level object (I assume in this case it is "Visio.Application").

It is not as efficient as early binding, but in this day and age the difference is usually not noticeable to the mere human.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top