无法找到网络驱动器的Excel Addin的错误处理

发布于 2025-02-02 23:23:26 字数 523 浏览 3 评论 0原文

我做了一个addin,并将其放在共享的网络驱动器上。

ADDIN包含一个seperat子,每当打开Excel文档时调用Addin,因此Addin将一直在Excel中提供。

当我在办公室和连接时,Addin正常工作,但是,如果我在家工作并打开Excel,那么Excel就会给我以下错误: “对不起,我们找不到。是否有可能被移动,更名或删除?” 这是因为我没有连接,而Excel无法检索我试图从中调用Addin的路径。

有没有办法处理此错误,因此消息不会显示?我试图忽略错误,因此消息不会显示,但这不起作用。在出现错误之前,如何退出子?或一个更好的解决方案是在不使用特定的网络驱动器作为位置的情况下调用自定义制作的addins。

我尝试了以下代码来忽略错误。


Sub Open_up () 

Application.DisplayAlerts = False

On Error Resume Next 

Call 'name of the addin 

End Sub ```

Hope it makes sense

I have made an addin and placed it on a shared networking drive.

The addin contains a seperat sub that calls the addin whenever an excel document is opened, so the addin will be available in excel all the time.

The addin works fine when i am in my office and when i am connected, however if i for example work from home, and opens excel, then excel gives me the following error:
"Sorry we couldn't find . Is it possible it was moved, renamed or deleted?"
This is because i am not connected and excel cannot retrieve the path i am trying to call the addin from.

Is there a way to handle this error, so the message dont show up? I have tried to ignore the error so the message dont show up but that does not work. How can i exit the sub before the error appears? or an even better solution is to call custom made addins without using a specific networking drive as location.

I have tried the following code to ignore the error.


Sub Open_up () 

Application.DisplayAlerts = False

On Error Resume Next 

Call 'name of the addin 

End Sub ```

Hope it makes sense

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

装迷糊 2025-02-09 23:23:26

看起来加载项没有加载,也无法从共享驱动器访问。我建议为加载项创建一个安装程序,以便可以在最终用户机器上安装。请参阅通过使用Windows安装程序来部署办公解决方案以获取更多信息。

It looks like the add-in was not loaded and not accessible from the shared drive. I'd suggest creating an installer for the add-in, so it could be installed on the end user machines. See Deploy an Office solution by using Windows Installer for more information.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文