vba 尽管加载项已加载并正常工作,但没有加载项选项卡

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/23841184/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-08 18:14:26  来源:igfitidea点击:

No Add-In Tab Though Add-In is Loaded and Working

excelvbaexcel-vbaexcel-2013

提问by Greg Lovern

I wrote an Excel VBA add-in over ten years ago, which uses the old Commandbars to put a menu in Excel's Tools menu (in Excel 2003 and earlier) or in Excel's Add-Ins tab (in Excel 2007 and later). I've never had a problem with the menu appearing, in all versions of Excel from 97 through 2013.

十多年前我编写了一个 Excel VBA 加载项,它使用旧的命令栏在 Excel 的工具菜单(在 Excel 2003 及更早版本中)或 Excel 的加载项选项卡(在 Excel 2007 及更高版本中)中放置一个菜单。在 97 到 2013 年的所有 Excel 版本中,我从未遇到过菜单出现问题。

But now a user says Excel Add-Ins menu not appearing for him in Excel 2013. Normally that means the add-in isn't loaded, but in his case the add-in is loaded and working. We know the add-in is loaded and working because the add-in adds user-defined worksheet functions, and those UDFs are working fine for him. But he wants to get to the add-in's menu and can't.

但是现在用户说 Excel 加载项菜单没有出现在 Excel 2013 中。通常这意味着加载项未加载,但在他的情况下加载项已加载并正常工作。我们知道加载项已加载并正常工作,因为加载项添加了用户定义的工作表函数,并且这些 UDF 对他来说工作正常。但他想进入加载项的菜单,但不能。

My googling showed that some people are having trouble with the Add-Ins menu in 2013, but I didn't find anything specific to this problem.

我的谷歌搜索显示有些人在 2013 年遇到了 Add-Ins 菜单的问题,但我没有找到任何特定于这个问题的东西。

Yes, he's tried enabling the Add-Ins tab in Excel Options > Customize the Ribbon.

是的,他尝试在 Excel 选项 > 自定义功能区中启用加载项选项卡。

BTW this is an .xla add-in, not a COM add-in.

顺便说一句,这是一个 .xla 加载项,而不是 COM 加载项。

Any suggestions?

有什么建议?

回答by ShaneSuzanne

I have Excel 2010 and had the add-in tab disappear for MrExcel HTML add-in. I tried all types of suggestions - and finally found one that worked for me!

我有 Excel 2010,并且 MrExcel HTML 加载项的加载项选项卡消失了。我尝试了所有类型的建议 - 终于找到了对我有用的建议!

Go to the add-ins folder where you have your add in saved. Right click on the file, and select Properties. At the bottom of the General tab - if it says "Security" - check on the "Unblock" option.

转到保存加载项的加载项文件夹。右键单击该文件,然后选择“属性”。在“常规”选项卡的底部 - 如果显示“安全” - 检查“取消阻止”选项。

Voila! My add-ins never disappear anymore!

瞧!我的插件再也不会消失了!

回答by Walter Schrabmair

Solved:

解决了:

Solved this now but really weird solution if you enabled the Add-in whilst the Analysis ToolPaks were enabled it'd have the issue you above, but if you enabled the Add-in whilst the Analysis ToolPaks weren't ticked then went back in to it and re-ticked the Analysis ToolPaks it'd be fine and wouldn't disappear! Was an extremely strange issue!

现在解决了这个问题,但非常奇怪的解决方案,如果您在启用分析工具库的同时启用加载项,则会出现上述问题,但是如果您在未勾选分析工具库的情况下启用加载项,则返回它并重新勾选分析工具包它会很好并且不会消失!是一个非常奇怪的问题!

See Spiceworks

香料

回答by user2641103

As far as I understood this is a problem with Excel 2013 (another attempt of the guys at Redmond to make our lives miserable with every update of their products). The workaround I've found is to include the following code into the ThisWorkbook module of the Addin:

据我所知,这是 Excel 2013 的一个问题(雷德蒙德的另一次尝试,每次更新他们的产品都让我们的生活变得悲惨)。我发现的解决方法是将以下代码包含在 Addin 的 ThisWorkbook 模块中:

Private Sub Workbook_Open()

    Workbook_AddinUninstall
    Workbook_AddinInstall

End Sub

Cheers!

干杯!

回答by Andrew

I had similar issue with excel 2013. Add-in tab was missing. I went to Developer>>>Add-Ins and deselected the add-in I wanted. Click OK then repeat the process and select the same add-in. Click OK. The Add-In tab should appear.

我在 excel 2013 中遇到了类似的问题。缺少加载项选项卡。我转到开发人员>>>加载项并取消选择我想要的加载项。单击“确定”,然后重复该过程并选择相同的加载项。单击确定。应出现加载项选项卡。

回答by sijpie

See also https://www.excelcampus.com/vba/add-in-ribbon-disappears/

另见https://www.excelcampus.com/vba/add-in-ribbon-disappears/

As of july 2016 the security settings in Excel disable the add-ins in the old default location. THe website shows how to set the directory to trusted status

截至 2016 年 7 月,Excel 中的安全设置禁用旧默认位置中的加载项。该网站显示了如何将目录设置为受信任状态

回答by Inverbis

Had a similar problem in Excel 2010. Tried all the suggestions above, but to no avail. In the end it turned out that even though it was an .xll add-in, it somehow also was listed as a COM add-in. So going to File > Options > Add-In, then selecting Disabled Items from the list at the bottom of that window and enabling the add-in, worked for me. Now in the list of Active Application Add-ins it shows both the original Excel Add-in, and the unexpected COM add-in without location. Oh, and the tab is back of course. Go figure.

在 Excel 2010 中遇到了类似的问题。尝试了上述所有建议,但无济于事。最后发现,即使它是一个 .xll 加载项,它也以某种方式被列为 COM 加载项。因此,转到“文件”>“选项”>“加载项”,然后从该窗口底部的列表中选择“禁用项目”并启用加载项,这对我有用。现在,在活动应用程序加载项列表中,它同时显示了原始 Excel 加载项和没有位置的意外 COM 加载项。哦,当然标签又回来了。去搞清楚。

回答by Mael Monnier

I have had similar problems with Excel 2016 (not with 2010 and 2017), and very strangely it was solved this way :

我在 Excel 2016 中遇到了类似的问题(不是 2010 和 2017),很奇怪的是它是这样解决的:

1) Desactivating the add-in 2) Quitting Excel 3) Activating the add-in 4) Going to File > Close (in French version : Fichier > Fermer)

1) 停用加载项 2) 退出 Excel 3) 激活加载项 4) 转到文件 > 关闭(法语版:Fichier > Fermer)

And when I click "Close" the "Components" menu suddenly appear in Excel 2016 !

当我单击“关闭”时,“组件”菜单突然出现在 Excel 2016 中!

Good luck !

祝你好运 !

回答by jones-chris

I had a similar problem where two .xlam files that loaded and appeared in custom ribbon tabs in Excel 2010 didn't show up in the ribbon in Excel 2013 even though they were loading each time a workbook was opened. I tried all sorts of solutions - disabling the Analysis Toolpack, disabling and enabling the .xlam files, making sure the .xlam's attached XML file was up to date (I was thinking an MSO image I had in the XML code was no longer available in Excel 2013), but nothing worked. I eventually tried copying and renaming the .xlam file and enabled it in Excel and, strangely, it appeared in the ribbon.

我有一个类似的问题,即加载并出现在 Excel 2010 中的自定义功能区选项卡中的两个 .xlam 文件没有显示在 Excel 2013 的功能区中,即使它们在每次打开工作簿时加载。我尝试了各种解决方案 - 禁用分析工具包,禁用和启用 .xlam 文件,确保 .xlam 的附加 XML 文件是最新的(我认为我在 XML 代码中的 MSO 图像不再可用Excel 2013),但没有任何效果。我最终尝试复制和重命名 .xlam 文件并在 Excel 中启用它,奇怪的是,它出现在功能区中。

I have no idea why it needed to be copied and renamed - it's almost like Excel 2013 needed a fresh copy of the .xlam file before it could show up. Very weird!

我不知道为什么需要复制和重命名它 - 这几乎就像 Excel 2013 需要一个新的 .xlam 文件副本才能显示。很奇怪!

回答by Carl Paradiso

I've been looking for this answer for a LONG time and the previous code worked, but, for me, only with Workbook_Open() instead of Thisworkbook_Open()

我一直在寻找这个答案很长一段时间,以前的代码工作,但是,对我来说,只有 Workbook_Open() 而不是 Thisworkbook_Open()

Private Sub Workbook_Open()
    Workbook_AddinUninstall
    Workbook_AddinInstall
End Sub

Thanks for finding this!

谢谢你找到这个!

回答by Belinda Jones

I disabled the add-ins via the Developer tab, and then enabled them via File>Options>Add-Ins>Manage Add-Ins.

我通过“开发人员”选项卡禁用了加载项,然后通过“文件”>“选项”>“加载项”>“管理加载项”启用它们。

Voila!

瞧!