VBA References

  • Thread starter Peter L Kessler
  • Start date
P

Peter L Kessler

Hi Group

I've just tried to install a set of custom VBA-driven Word document
templates onto another users machine and came across a problem.

I have Word 97, and my user forms and modules reference Microsoft DAO 3.51
Object Library and Microsoft ActiveX Data Objects 2.5 Library. On the
previously untested PC these were not available, and attempting to run my
templates came up with a user-form error in hidden module. So obviously Word
doesn't auto-reference these for me. Is there a way of making my VBA script
do this in an AutoExec so that the error will not occur? Is there another
way around this problem? Any help would be much appreciated.

Best wishes
Peter Kessler

Kessler Associates
E: (e-mail address removed)
W: www.kessler-web.co.uk
 
T

Thomas Winter

If the machine you are testing on does not have ADO installed on it, then
your code isn't going to work anyway. Part of distributing your templates
would include installing ADO on the target machines. Or perhaps I'm not
understanding the problem.

-Tom
 
P

Peter L Kessler

Hello Tom

The thing is, once I opened up my template on the target PC I could then set
up the References manually through the VBA editor, so they were on the
machine, they just weren't activated.

Still, installing ADO along with my templates sounds like a good idea.
Precisely what files would I have to include from my own PC?

Best wishes
Peter Kessler

E: (e-mail address removed)
W: www.digital.kessler-web.co.uk
 
T

Thomas Winter

That is interesting, but it could be because there are many different
versions of ADO, and this client PC has an old one while your code is
expecting a new one. Just a possibility. I'm honestly not an expert in ADO
stuff...

To get more info and the redistrubtables for ADO, start out at the Data
Access part of MSDN:
http://msdn.microsoft.com/library/default.asp?url=/nhp/Default.asp?contentid=28001860

MDAC (Microsoft Data Access Components) is the thing you want. It includes
ADO. Latested and greatest is downloadable from:
http://www.microsoft.com/downloads/...e3-c795-4b7d-b037-185d0506396c&DisplayLang=en

This is the file you want to RUN on the client's PC to install MDAC/ADO. You
really can't just install the individual files you need. You gotta install
the whole monster.

Watch out for two things. MDAC 2.8 (the latest) apparently doesn't work on
Windows 95.

Also, Jet stuff (for use with Access databases) is not included in the
latest MDAC. You'll want (I believe) MDAC 2.5 and the Jet 4.0 Service Pack.
Look here:
http://msdn.microsoft.com/library/default.asp?url=/downloads/list/dataaccess.asp

This type of stuff would be better answered in the group
microsoft.public.data.ado. You'll get much better answers there (much better
than mine at least!)

-Tom
 
P

Peter L Kessler

Hi Tom

You've been more than helpful enough. I have a pretty good start now in
working out what I need to do, so thanks for that. I think you are right
about the client PC having an old version of ADO, so I will look into
including the whole package as part of the install.

Cheers
Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top