Solved

What type binding VBA to use if unknown library references

Posted on 2013-12-28
6
372 Views
Last Modified: 2013-12-28
I have a new client and am creating a simple ACCESS 2010 database.  But I do not know what reference libraries have been checked on the different machines.  What would be the best way to approach this unknown?  Say I need to creat an Excel workbook in an ACCESS module, what would be the best approach if I am unsure whether they have the Excel library checked?
0
Comment
Question by:ssmith94015
  • 2
  • 2
  • 2
6 Comments
 
LVL 11

Accepted Solution

by:
Technodweeb earned 500 total points
ID: 39743785
Here is an article that gives a very good explanation specific to MS Access.
http://stackoverflow.com/questions/5612640/setting-object-library-references-dynamically-possible
0
 

Author Closing Comment

by:ssmith94015
ID: 39743790
All my web searching and I never came across this article, which was exactly what I needed.  thank you.
0
 
LVL 11

Expert Comment

by:Technodweeb
ID: 39743792
Opps... wrong comment for wrong question... lol

Thanks...!
0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
LVL 75
ID: 39743867
Just a note  re "if I am unsure whether they have the Excel library checked?"

Well, it doesn't exactly work like that. If *your* app has the Excel Library check in References, then ... in *most* cases, that Reference will automatically be set on a user's system where you install your db.

So, Early Binding vs Late Binding isn't really about a Reference being 'checked' per se. The case for using Late Binding (with a possible - performance hit) is when you are installing your db on systems which may have different (usually later) versions of Access/Office/Windows - which can (and does) often lead to ... confusion in References getting 'set' correctly.

So for example, at my work ... all users have the exact same version of Windows/Office, so Early Binding is not really an issue.  On the flip side, if I was shipping an app out in the wild - and I wasn't absolutely sure what the environment was going to be - then I would probably be using Late Binding.

mx
0
 
LVL 75
ID: 39743873
Also, here are a couple more articles you may find useful on the subject:

Using early binding and late binding in Automation
http://support.microsoft.com/kb/245115

Late Binding in Microsoft Access
http://www.granite.ab.ca/access/latebinding.htm
0
 

Author Comment

by:ssmith94015
ID: 39743969
Techno dweeb LOL!!!! No matter, it answers my question!

DatabaseMX, the environment is unknown to me so late binding will do the job.  I have asked them repeatedly for me to test, but so far they have not had the "time" to let me!  Good thing they like what I have created so far in the demos!

Thank you both.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

MS Access 2003 or later To MySQL Migration Project Hello All, this is my second article in the category of MS-OFFICE Automation. In internet I am not able to find any comprehensive resource on the Migration of MS Access back-end to MySQL so I fin…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now