vba Excel - “找不到文件:VBA6.DLL”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1296830/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Excel - "File Not Found: VBA6.DLL"
提问by Saobi
I have an Excel 2007 Sheet with Macros. When I click on a button, it immediately pops up an error "File Not Found: VBA6.DLL"
我有一个带有宏的 Excel 2007 工作表。当我点击一个按钮时,它立即弹出一个错误“找不到文件:VBA6.DLL”
Problem is, I have been using this sheet forever, and never seen this problem before. I did make some very very minor changes to the Macro code.
问题是,我一直在使用这张表,以前从未见过这个问题。我确实对宏代码做了一些非常非常小的改动。
And, I have 2 other sheets with identical macro code which I made the same changes to. And those two sheets run fine.
而且,我还有另外 2 张具有相同宏代码的工作表,我对其进行了相同的更改。那两张纸运行良好。
Any ideas?
有任何想法吗?
回答by Fionnuala
In this order:
按照这个顺序:
Check your references (Alt+F11, Tools-References) to see if any are marked MISSING and make sure that Visual Basic for Applicatiions is checked.
Check the directory C:\WINDOWS\system32 for VBA6.dll
You may need to register VBA6.dll (Start->Run)
Regsvr32.EXE "C:\WINDOWS\system32\VBA6.dll"
检查您的参考文献(Alt+F11,工具-参考文献)以查看是否有任何标记为 MISSING,并确保选中 Visual Basic for Applicatiions。
检查目录 C:\WINDOWS\system32 中是否有 VBA6.dll
您可能需要注册 VBA6.dll (Start->Run)
Regsvr32.EXE "C:\WINDOWS\system32\VBA6.dll"
回答by Brian
I had the same problem with a shared file. The fix was as follows:
我在共享文件时遇到了同样的问题。修复如下:
- Un-share the file
- Copy all macros; sheets, this workbook, modules and saved them in a text format.
- Save the .xlsm as a .xlsx file
- Save back to .xlxm file
- Paste all macros back in
- Reset shortcut keys and descriptions in macro options
- Re-share the file
- 取消共享文件
- 复制所有宏;工作表、此工作簿、模块并将它们保存为文本格式。
- 将 .xlsm 保存为 .xlsx 文件
- 保存回 .xlxm 文件
- 将所有宏粘贴回
- 重置宏选项中的快捷键和说明
- 重新共享文件
This worked without having to go to IT and get someone with administrative credentials to fix it.
无需求助于 IT 部门并让具有管理凭据的人员来修复它,即可完成此操作。