如何从 .cab 文件(Excel 用户表单和 VBA)安装 mscomct2.ocx 文件
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/15816014/
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
How to install mscomct2.ocx file from .cab file (Excel User Form and VBA)
提问by rryanp
I have an Excel spreadsheet with a user form that uses the calendar control. It works fine on my machine, but others can't use it because they are missing the mscomct2.ocx file. I found where to download it (http://support.microsoft.com/kb/297381), but it comes down as a cab file, and I'm not sure how to tell others to use that file. My internet searches point to a variety of solutions from copying it to the system32 file to registering it using regsrv32. I was hoping somebody here could give me layman's instructions, as I hate to ask these other users to try five different things.
我有一个 Excel 电子表格,其中包含一个使用日历控件的用户表单。它在我的机器上运行良好,但其他人无法使用它,因为他们缺少 mscomct2.ocx 文件。我找到了在哪里下载它 ( http://support.microsoft.com/kb/297381),但它作为一个 cab 文件出现,我不知道如何告诉其他人使用该文件。我的互联网搜索指向各种解决方案,从将其复制到 system32 文件到使用 regsrv32 注册它。我希望这里有人能给我外行的指示,因为我讨厌让这些其他用户尝试五种不同的东西。
回答by wilsjd
You're correct that this is really painful to hand out to others, but if you have to, this is how you do it.
你是对的,把这件事分发给别人真的很痛苦,但如果你必须这样做,你就是这样做的。
- Just extract the .ocx file from the .cab file (it is similar to a zip)
- Copy to the system folder (c:\windows\sysWOW64for 64 bit systems and c:\windows\system32for 32 bit)
- Use regsvr32 through the command prompt to register the file (e.g. "regsvr32 c:\windows\sysWOW64\mscomct2.ocx")
- 只需从 .cab 文件中提取 .ocx 文件(类似于 zip)
- 复制到系统文件夹(对于 64 位系统为c:\windows\sysWOW64,对于 32 位系统为c:\windows\system32)
- 通过命令提示符使用 regsvr32 注册文件(例如“ regsvr32 c:\windows\sysWOW64\mscomct2.ocx”)
References
参考