Solved

What type binding VBA to use if unknown library references

Posted on 2013-12-28
6
386 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
6 Comments
 
LVL 11

Accepted Solution

by:
Gregory Miller 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:Gregory Miller
ID: 39743792
Opps... wrong comment for wrong question... lol

Thanks...!
0
MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

 
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

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

734 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