Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reference error

Status
Not open for further replies.

magicunc

Technical User
Aug 10, 2005
1
US
I have designed a software in MS-Excel/ VBA in MS Office 2000. When I tried to run it in MS Office 2003, it stalled because of a "reference" error. When I looked into Tools==> References menu of the VBA editor, it showed that the DLL file for Microsoft Web Components 9.0 (MSOWC.DLL) could not be located as it had changed in the later version. This version uses a different file name. I don't really know when I am invoking this web components file, but I am unable to run simple things like a FOR-NEXT loop from my program on MS Office 2003. To make the program run, I had to click on the Tools==> Reference menu and deselect the webcomponents option from Available references. Following this, the MS OFFICE 2003 found out the appropriate file and the program worked fine. But I had to do this every time I run it on another computer, which is a nuisance. It also means that I cannot lock the code because the program simply stalls without giving a proper error message.

Is there a quick fix so that I can always run my program on MS Office 2003 on different computers without going into the Tools menu of VBA.

 
You can programatically determine what version is being used, and then programtically reference, or de-reference, the appropriate references.

Which is a heck of a lot of the use of the word reference!

Gerry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top