关闭Excel电子表格的更新链接关闭消息 [英] Turn Off Msg for Update Links for Excel Spreadsheet upon Opening

查看:339
本文介绍了关闭Excel电子表格的更新链接关闭消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个我想打开的工作簿,没有要求更新链接(确切的消息是:

I have a workbook that I would like to open and not have it ask to update links, (exact message is :

此工作簿包含指向其他数据的链接来源,如果您更新链接,Excel将尝试检索最新的数据,如果您没有更新链接,Excel将使用以前的信息。请注意,数据链接可用于未经您的许可访问和共享机密信息,可能会执行其他有害行为,如果您不信任本工作簿的来源,请不要更新链接。)

"This workbook contains links to other data sources. If you update the links, Excel will attempt to retrieve the latest data. If you odon't update the links, Excel will use the previous information. Note that data links can be used to access and share confidential information without your permission and possibly perform other harmful acts. Do not update the links if you do not trust the source of this workbook." )

我想要做的是打开工作簿点击Internet Explorer中的文件,并更新链接,但不要求用户单击按钮进行更新。

What I would like to do is open the workbook by clicking on the file in Internet Explorer and have the links update but not ask for the user to click the button to update.

我在Open Event中尝试过以下代码对于没有成功的工作书:

I have tried the following code in the Open Event for the work book with not success:

 Private Sub Workbook_Open()
     Application.DisplayAlerts = False
     Application.ScreenUpdating = False
 End Sub

我还在上面的Sub中尝试了以下代码行:

I have also tried the following lines of code in the above Sub:

ActiveWorkbook.UpdateLink Name:=ActiveWorkbook.FullName, Type:=xlExcelLinks
Application.ActiveWorkbook.UpdateLink Name:=ActiveWorkbook.FullName, Type:=xlExcelLinks
Application.ActiveWorkbook.UpdateLink
Workbooks.Open ActiveWorkbook, UpdateLinks:=True
ActiveWorkbook.UpdateLink Name:=ActiveWorkbook.LinkSources, Type:=xlExcelLinks

MS Excel 2010的版本,并保存到.xls文件,以便于具有旧版本的文件。

The version of MS Excel 2010 and saving to an .xls file for sake of those with legacy versions.

您的帮助将不胜感激。谢谢你所有的帮助。

Your help would be very appreciated. Thank you in advance for all your help.

尊重地,

Robert

推荐答案

如果这可能有助于将来的任何人,以下是我所做的:

Just in case this might help anyone in the future the following is what I did:

Private Sub Workbook_Activate()
   Application.AskToUpdateLinks = False

End Sub

这阻止了在打开文件时出现更新链接消息框。

This prevented the Update Links message box from appearing when the file is opened.

Robert

这篇关于关闭Excel电子表格的更新链接关闭消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆