无法找到网络驱动器的Excel Addin的错误处理
我做了一个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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看起来加载项没有加载,也无法从共享驱动器访问。我建议为加载项创建一个安装程序,以便可以在最终用户机器上安装。请参阅通过使用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.