Word/Access/VB 2003 Problem

C

ChiliGuy

We have an application that was built by a consultant that integrates Word and Access using VB. He just updated the application using Word 2002, and I don't know what version of VB. I am trying to use this application with Word 2003. The application runs by simply opening a Word .doc file and it presents a "menu" consisting of several buttons that can be clicked to generate a particular task. However, when I click just about any of the buttons, the VB Editor opens up and displays the following message: "Compile Error: Can't find object or library.

I have checked my hard drive and all of the standard .olb and .dll files exist in the Microsoft Shared and the WINNT folders. I have checked my security settings and have set the macro security to medium so that it prompts me to "Enable Macros" (desired with this app), and checked the box to "Trust access to Visual Basic Project.

I'm at a loss as to what to try next. Can anyone help?
 
S

Steve Lang

Hi ChiliGuy

When you get the error and the VBE opens, go to Tools | References and see
what the code is looking for that it can't find. the name of whatever it is
will be preceded with "MISSING."

HTH and have a great day!

Steve

ChiliGuy said:
We have an application that was built by a consultant that integrates Word
and Access using VB. He just updated the application using Word 2002, and I
don't know what version of VB. I am trying to use this application with Word
2003. The application runs by simply opening a Word .doc file and it
presents a "menu" consisting of several buttons that can be clicked to
generate a particular task. However, when I click just about any of the
buttons, the VB Editor opens up and displays the following message: "Compile
Error: Can't find object or library."
I have checked my hard drive and all of the standard .olb and .dll files
exist in the Microsoft Shared and the WINNT folders. I have checked my
security settings and have set the macro security to medium so that it
prompts me to "Enable Macros" (desired with this app), and checked the box
to "Trust access to Visual Basic Project."
 
X

XmlAdoNewbie

Hi ChiliGuy,
I have experienced this as well and i think it's most likely the
problem i encountered. VBA for office 2002 and office 2003 have some
differences in the libraries that your code will reference. In the
project that is throwing the error, go into the code editor by
pressing ALT F11. on the menu bar go into
tools -> references, you will most likely see one of the checked
references at the top of the reference list saying "MISSING : " and
then a description. THis is the library that doesn't match up with the
version of vba you are using. If you uncheck this and then save your
code will automatically find the appropriate library and include the
reference.

This is how i have fixed the problem in the past, if someone else
knows a better way i would be happy to hear it.

Hope this helps,
Erin
 

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