Re: Access Runtime on PC without MS Office



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


.



Relevant Pages

  • Re: Outlook dependency
    ... >like to ship with my installation the libraries, files, OLB's and other ... Late binding means you can safely remove the reference and only have ... an error when the app executes lines of code in question. ...
    (microsoft.public.access.forms)
  • Re: dynamic linking/referencing Office libraries
    ... You don't need to create a reference at all. ... Use late binding instead. ... an error when the app executes lines of code in question. ... Tony Toews, Microsoft Access MVP ...
    (microsoft.public.access.modulesdaovba)
  • Re: Access 2000 Find Inbox at Runtime
    ... up the app and not allowing the users in the app at all. ... You'll want to install the reference if you are programming or debugging and want to ... remove the reference and setup the late binding statements. ... Binding in Microsoft Access" page at http://www.granite.ab.ca/access/latebinding.htm ...
    (microsoft.public.outlook.interop)
  • Re: Access 2000 Find Inbox at Runtime
    ... up the app and not allowing the users in the app at all. ... You'll want to install the reference if you are programming or debugging and want to ... remove the reference and setup the late binding statements. ... Binding in Microsoft Access" page at http://www.granite.ab.ca/access/latebinding.htm ...
    (microsoft.public.outlook.general)
  • Re: Access 2000 Find Inbox at Runtime
    ... up the app and not allowing the users in the app at all. ... You'll want to install the reference if you are programming or debugging and want to ... remove the reference and setup the late binding statements. ... Binding in Microsoft Access" page at http://www.granite.ab.ca/access/latebinding.htm ...
    (microsoft.public.outlook.program_vba)