Re: Access Runtime on PC without MS Office
- From: "Rick Brandt" <rickbrandt2@xxxxxxxxxxx>
- Date: Mon, 09 Oct 2006 12:07:46 GMT
Rick in NS wrote:
Oh boy!!! I have peppered the application with code to control
toolbars using the CommandBar object which I believe is in the
Microsoft Office Object Library 11.0 which is one of the references
in my application but not in the Access 2003 default. In addition I
have an Excel pivot table which relies on the Office XP Web Componets
(OWC10.DLL) to function properly. Removing either the reference to
the WDC10.DLL or to the Office Libary 11.0 kicks out numerous compile
errors.
I don't pretend to understand the concept of 'late binding'. Is
there a fix for this; or am I going to have to rewrite the
application removing any reference in the code to the CommandBar
object or to a OWc10.PivotTable?
Would another approach; insisting the target machine have some
version of Office on it resolve the issue?
No because "some version" would not be adequate. With early binding (where you
set references) the exact version is required in almost all cases even down to
having the same service packs installed.
Google these groups on "late binding". It is not very difficult to switch your
code to use that and it really is the only way to do it when you have multiple
machines that you cannot absolutely control what software is installed. In
fact, most developers use early binding first to get things working because
debugging is easier and you get to use the intellisense features in the VBA
editor, then make the few changes to late binding afterwards when everything is
working.
There are two huge advantages to late binding. If the user is totally missing a
required external library, then the features in your app that depend on that
library obviously don't work, but everything else in your app still functions
normally. As you have seen, with early binding a missing reference causes many
VBA functions to fail that have nothing at all to do with the missing library.
Your app basically falls on its face.
The second big advantage is that your external library calls become (for the
most part) version independant. In your case as long as you are not using any
Excel features that only exist in a certain version then ANY version of
Office/Excel will likely work. With early binding you normally have to have
the exact version for the app to function.
--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
.
- Follow-Ups:
- Re: Access Runtime on PC without MS Office
- From: Rick in NS
- Re: Access Runtime on PC without MS Office
- From: Rick in NS
- Re: Access Runtime on PC without MS Office
- References:
- Re: Access Runtime on PC without MS Office
- From: Rick Brandt
- Re: Access Runtime on PC without MS Office
- From: Rick in NS
- Re: Access Runtime on PC without MS Office
- Prev by Date: Re: How do I use Access 2003 with SQL Server Express?
- Next by Date: Re: Access can't run when I'm logged off?
- Previous by thread: Re: Access Runtime on PC without MS Office
- Next by thread: Re: Access Runtime on PC without MS Office
- Index(es):
Relevant Pages
|