Solved

What type binding VBA to use if unknown library references

Posted on 2013-12-28
6
375 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
Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

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…
The System Center Operations Manager 2012, known as SCOM, is a part of the Microsoft system center product that provides the user with infrastructure monitoring and application performance monitoring. SCOM monitors:   Windows or UNIX/LinuxNetwo…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

932 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