vba 附加控件中没有 ListView
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/9768483/
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
There is no ListView in Additional Controls
提问by aurel
I tried to run VBA application on someone else's computer, but I get an error: "Could not load an object because it is not available on this machine"
我试图在其他人的计算机上运行 VBA 应用程序,但出现错误:“无法加载对象,因为它在本机上不可用”
I checked all the references, and they seem ok. During research I found out that the object that is missing is ListView control. I checked if there is Microsoft Windows Common Controls 6.0 (SP6) checked in references - and there is. I tried to reinstall this library but it still didn't do any good.
我检查了所有参考资料,它们看起来不错。在研究过程中,我发现缺少的对象是 ListView 控件。我检查了参考文献中是否有 Microsoft Windows Common Controls 6.0 (SP6) - 并且有。我试图重新安装这个库,但它仍然没有任何好处。
I checked that there is no "Microsoft ListView Control, version 6.0" in Additional Controls, nor "Microsoft ImageList Control, version 6.0". Seems like the library isn't there, althought I can see the MSCOMCTL.OCX in C:\windows\system32\ with right last modification date and size.
我检查了附加控件中没有“Microsoft ListView Control, version 6.0”,也没有“Microsoft ImageList Control, version 6.0”。似乎库不存在,虽然我可以在 C:\windows\system32\ 中看到 MSCOMCTL.OCX,并带有正确的最后修改日期和大小。
Is there anything else I can try?
还有什么我可以尝试的吗?
回答by Radek
Maybe you could try to register MSCOMCTL.OCX
file with regsvr32
:
也许您可以尝试使用以下方式注册MSCOMCTL.OCX
文件regsvr32
:
regsvr32 c:\Windows\System32\MSCOMCTL.OCX
or for 64 bit systems
或 64 位系统
regsvr32 c:\windows\syswow64\mscomctl.ocx
Remember to open the command prompt in Administrator mode first.
记得先在管理员模式下打开命令提示符。