“找不到文件:VBA6.dll”错误-奇怪的行为 [英] 'File Not Found: VBA6.dll' Error - Strange Behaviour

查看:1274
本文介绍了“找不到文件:VBA6.dll”错误-奇怪的行为的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在运行Windows 8和Office 2013(64位)。我试图继续从Office 2010(32位)开始的Excel中VBA中的开发。我知道必要的64位更改,但是我收到令人困惑的配置错误。

I am running Windows 8 with Office 2013 (64-Bit). I am trying to continue developments in VBA in Excel that I started with Office 2010 (32-Bit). I am aware of the necessary 64-Bit alterations however I am receiving confusing configuration errors.

这里是问题所在:


  • 如果我创建一个新的Excel文件和VBA项目;我所有的VBA代码都能正常运行。没问题。

  • 如果我打开并使用以前在Office 2010中开发/使用的文件中的宏,则会收到找不到文件:VBA6.dll错误消息。 / li>
  • 一旦开始接收消息,我将在所有VBA宏上接收到该消息;即使是以前(工作时间不超过30秒)的新文件也可以正常工作。

  • 如果我随后重新创建一个新的Excel文件和新的VBA Project,那段新代码可以正常工作。没问题-直到我在错误文件之一中运行代码。错误然后蔓延到我的新开发中。

这就像Excel混淆了其引用,但是每次我检查它们时(好

It's as if Excel is getting its references confused but every time I check them (on good or bad files) they are always exactly the same.

注意:


  • 我的参考文献都没有丢失。

  • 我的系统上没有VBA6.dll。我有VBA7, Visual Basic for Application引用也指向 C:\Windows\SysWOW64\msvbvm60.dll

  • 还有另外两个 Visual Basic for Application列表中的引用,但不会让我更改它们

  • 它可以在没有VBA6.dll的新文件上使用,所以我认为这不是必需的?

  • 我已经检查并安装了所有最新的Windows更新。

  • None of my references are missing.
  • I don't have VBA6.dll on my system; I have VBA7 and the 'Visual Basic for Application' reference refers too 'C:\Windows\SysWOW64\msvbvm60.dll'
  • There are two other 'Visual basic for Application' references on the list but it wont let me change them
  • It works on new files without VBA6.dll so I assume it isn't required?
  • I have checked for and installed all the latest Windows updates.

如何解决此问题?


  • 如果您认为我需要VBA6.dll,那是因为引用的库在使用它吗?

  • 如果是这样,为什么他们不使用VBA7?

  • 为什么在打开旧的VBA6文件之前它能正常工作? Excel会突然决定所有文件仅因为一个文件曾经使用过而必须使用VBA6吗?

任何能解决我困惑的事情,

Anything to cure me of my confusion is much appreciated,

最诚挚的问候

编辑:我差点忘记提了;


  • 收到错误后尝试调试错误时,Excel崩溃(每次)。

  • 我也向 [具有相同系统配置]的同事发送了一个错误文件,该同事尚未收到此问题-他们也收到了错误消息。提示文件有问题吗?

编辑2:

问题尚未解决。我希望投票表决不会阻碍我得到答案的机会。

The problem is not yet resolved. I hope the downvote will not hinder my chances of an answer.


  • 我也尝试过重新注册库,但没有任何改变。
  • I have also tried re-registering libraries but nothing has changed.
  • If I open a 'bad file' I can add new Macros and they work fine; but the second I run an existing Macro and receive the error, the new Macros do not work either.

推荐答案

该错误是在Office 2013(64位)安装期间引起的。 VBA7 DLL未正确注册,因此我不得不打开regedit并在两者中手动输入正确的文件路径

The error was caused during Office 2013 (64-bit) installation. The VBA7 DLL was not registered correctly so I had to open regedit and manually input the correct filepath in both


  • HKEY_CLASSES_ROOT\TypeLib {000204EF- 0000-0000-C000-000000000046} \

    • 6.0\9\win32

    • 4.2\9\win32

    替换'C:\Windows\SysWOW64\msvbvm60.dll Visual Basic for Applications到VBA7 DLL文件路径的数据值(在问题中提到)。在我的系统上是:

    Replacing the 'C:\Windows\SysWOW64\msvbvm60.dll' data value (mentioned in the question) for Visual Basic for Applications to the VBA7 DLL filepath. Which on my system is:


    • C:\Program Files\Common Files\Microsoft Shared\VBA\VBA7.1 \VBE7.dll

    现在所有文件都可以使用;我希望这将来能解决其他任何人的问题。

    All files now work; I hope this solves the problem for anyone else in the future.

    这篇关于“找不到文件:VBA6.dll”错误-奇怪的行为的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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