vba excel:mid:找不到项目或库
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1923516/
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: mid: can't find project or library
提问by l--''''''---------''''''''''''
for some reason in my VBA code in excel, when it gets to a line of code where i am using midit says can't find project or library. what does this mean?
出于某种原因,在我在 excel 中的 VBA 代码中,当它到达我正在使用的一行代码时,mid它说找不到项目或库。这是什么意思?
采纳答案by Christian Payne
I would go old skool and remove the structure manager activex control.
我会去老skool并删除结构管理器activex控件。
I gave similar instructions on how to do this are here!
我在这里给出了有关如何执行此操作的类似说明!
Have a look at: regsvr32
看看:regsvr32
- Close Excel
- Click Start / Run / cmd
- Type
regsvr32 /u [path of old dll]/[filename]
- 关闭 Excel
- 点击开始/运行/cmd
- 类型
regsvr32 /u [path of old dll]/[filename]
Eg:
regsvr32 /u c:\windows\system32\file.dll
例如:
regsvr32 /u c:\windows\system32\file.dll
(You can add /q to hide all messages)
(您可以添加 /q 以隐藏所有消息)
Good luck!
祝你好运!
回答by Dominik Fretz
This is due some problem with references within VBA in your workbook.
这是由于工作簿中 VBA 中的引用存在一些问题。
In the VBA editor, go to 'Tools-> References'. There you would find a reference with 'MISSING:' in front. Uncheck that and your problem should be fixed.
在 VBA 编辑器中,转到“工具-> 引用”。在那里,您会找到前面带有“失踪:”的参考。取消选中,您的问题应该得到解决。
If the missing reference was something like 'Visual Basic for Application' or 'Microsoft Office Object library, you should look for a reference that has no 'MISSING:' text and select this.
如果缺少的引用类似于“Visual Basic for Application”或“Microsoft Office Object library”,您应该查找没有“MISSING:”文本的引用并选择它。
回答by hawbsl
Go to the VBA editor (e.g. by using ALT-F11).
转到 VBA 编辑器(例如使用 ALT-F11)。
Click on Tools->References
点击工具->参考
If any references are marked MISSING then correct those missing references. This should fix your problem.
如果任何引用被标记为 MISSING,则更正那些缺失的引用。这应该可以解决您的问题。
回答by Michael Paulukonis
Do you have any references to anylibrary that is missing?
您是否对任何缺少的库有任何引用?
I've found that any bad reference -- even when not used in the code -- can throw the entire system off, so that even built-in functions are mapped wrong.
我发现任何错误的引用——即使没有在代码中使用——都会使整个系统崩溃,因此即使是内置函数也被错误地映射。
回答by user310563
"Click on Tools->References If any references are marked MISSING then correct those missing references. This should fix your problem."
“单击工具-> 参考文献如果任何参考文献被标记为缺失,则更正那些缺失的参考文献。这应该可以解决您的问题。”
It solved my problem (Left function throwing error "can't find project or library).
它解决了我的问题(左函数抛出错误“找不到项目或库)。

