Solved

What type binding VBA to use if unknown library references

Posted on 2013-12-28
6
380 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
Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

 
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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Leon
Software Metering within our group of companies has always been an afterthought until auditing of software and licensing became a pain point. Orchestrator and SCCM metering gave us the answer and it was an exciting process.
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
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…

773 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