MS Access找不到项目或库错误 [英] MS Access Can't Find Project or Library Error

查看:103
本文介绍了MS Access找不到项目或库错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个供我使用的访问数据库.我熟悉编写VBA代码以执行功能,但是,我一点也不精通调试某些错误.

I am working on an access database that was built for me to use. I am familiar with writing VBA code to perform functions, however, I am not at all versed in debugging certain errors.

数据库中有一个表格,使我可以清理和处理可以从计算机中选择的文件中的数据.它使用文件夹作为主要根目录,以查找提供该文件夹中文件名的表单的位置.还连接了一个按钮,用于执行数据清理和操作.

There is a form in the database that allows me to clean up and manipulate data in files that I can select from my computer. It uses a folder as the main root to look into where I supply the form with the names of the files located in the folder. There is also a button that is connected to perform the data clean up and manipulations.

现在,背景变得混乱了,出现了一个我似乎无法通过的错误.看起来如果我解决了这个错误,它还会滚雪球.本质上,该错误是找不到项目或库".查阅我的资源后,我注意到缺少一个Microsoft Excel 15.0对象库.是否有人知道此错误与访问之间的关系,以及如何解决此问题?

Now that the background is out of the way, there is an error that I can't seem to get passed. It also looks like if I solve the error, it snowballs into something else. Essentially the error is a "Cannot find Project or Library." After going into my resources I noticed that there is a Microsoft Excel 15.0 Object Library that is missing. Does anyone know the relationship between this error and access, as well, as how to fix this?

推荐答案

这是Microsoft Office VBA中的常见问题.尽管它可能有多个原因,但在您的情况下,似乎为您开发解决方案的人正在使用与您开发的Office版本不同的Office代码. (每当在Office 2003和Office 2010平台之间移动相同的应用程序时,都会出现相同的错误.)

This is a common problem in Microsoft Office VBA. While it can have more than one cause, in your case it appears that the person who developed the solution for you was using a different version of Office from yours for development of the code. (I get the same error whenever I move the same application between Office 2003 and Office 2010 platforms.)

要解决此问题:

  1. 在工具..参考"窗口中,取消选中"MISSING:Microsoft Excel 15.0"参考.
  2. 向下滚动按字母顺序排列的参考文献列表.找到Microsoft Excel对象库的条目(我认为您在计算机上具有该条目),但是其版本号会有所不同.检查一下.
  3. 重新编译并保存.

如果VBA环境能够提供更有用的错误诊断,那将是很好的选择,但我不确定这对Microsoft来说有多么容易实现,因为VBA和库之间的互操作使用了古老的COM技术. :错误恢复将涉及VBA识别替代方案,并尝试使用该库作为替代方案.

It would be nice if the VBA environment was able to provide a more useful error diagnostic, but I'm not sure how easy this would be for Microsoft to accomplish, given that interoperation between VBA and the library uses the venerable COM technology: error recovery would involve VBA recognizing that an alternative, and to attempt to use that library as a substitute.

这篇关于MS Access找不到项目或库错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆