Object Not Available Error

  • Thread starter Thread starter Cathy Myers
  • Start date Start date
C

Cathy Myers

Hello There,

When some of my users open an Excel document created in
Office 97 on their Office XP machines, they receive an
error:

COuld not load some objects because they are not available
on this machine.

It seems odd to me that the later Office version does not
support objects from the earlier one. Does anyone have any
ideas on how I might fix this? Thank you in advance for
your consideration.

Yours,
C.M.
 
It's likely that the document is referencing objects or type libraries that
are not present on the target machine. This is common.

To get an idea of which ones could be at fault go to the VB editor choose
Tools > References and see if there is anything which says MISSING.

It's possible the component itself (the DLL) is physically there but in a
different location than that of the machine which created the file. If this
is the case it may be possible to rewrite the code to make it work on any
machine with the component irrespective of it's location. However this is
another topic which is more involved.


--

Regards,


Bill Lunney
www.billlunney.com
 
Hi Bill,

Thanks for the response. No, nothing says "missing". I
think the microsoft date/time picker is at fault. When the
document is opened on Office XP machines, the drop-down
boxes for selecting dates is unavailable, or as you said,
in a different location. What do you suggest I do? Any
chance of giving me the code you referred to? I appreciate
your consideration.

Yours,
C.M.
 
Are these objects you refer to on a worksheet and/or a userform? You mention
the DTP control. If you're going to make use of custom ActiveX controls
such as this then you have to be sure they are going to be present on the
clients. Look at the control your using, find out it's filename (in this
case it would be c:\winnt\system32\mscomct2.ocx) and see if it's present on
your target PC AND in the same location.

I didn't refer to any specific code. My assumption was you were
instantiating objects in VBA code, not placing ActiveX controls onto
containers such as worksheets or forms.

This is a real pig to deal with. Had the problem myself. You want to make
use of rich functionality contained in other controls but come up against
DLL hell type problems such as this.

I tend to sacrifice the eye candy for an easier time with deployment to
multi-OS clients.


--

Regards,


Bill Lunney
www.billlunney.com
 
Hey Bill,

Thanks for the response. The date/time picker is being
used on a form on a worksheet. I downloaded and registered
mscomct2.ocx to my machine and the workbook works fine. I
am wondering if there is code to automate this
installation for my other users. I saw a suggestion in
another thread about the shell command, but the poster
warned about inconsistencies with it. Do you have any
ideas? I appreciate your consideration.

Yours,
C.M.
 
I answered something similar to this today. The reply was...

You could try using the Shell command to physically copy the file to say
c:\winnt\system32 then use REGSVR32 c:\winnt\system32\filename.ocx to
register the OCX.

However depending on what your doing you may have mixed success with this.
Note it's better to refer to the system dir environment variable instead of
winnt as this can change according to OS/installation.


Yeah basically I agree with your other poster's comment. This isn't ideal,
it's not particulary robust. It's really a deployment thing that can be
dealt with by your PC support department. If this is part of a reasonable
size solution it's usually possible to just create a package which remotely
installs the necessary files (in this case it would just be one file).
However I suspect your solution is reasonablly small and so the hassle of
this is a real pain.

I'd be tempted to kick the DTP! Just provide a textbox or whatever and do
the validation yourself. Done this kind of thing a lot before and my view
is it's easier than suffering the pain of support calls saying things aren't
working.


--

Regards,


Bill Lunney
www.billlunney.com
 
Back
Top