简体   繁体   English

VBA:防止Excel在打开时更新链接

[英]VBA: Prevent Excel from updating links on open

I have a workbook with multiple external links, 我有一本包含多个外部链接的工作簿,

I don't want these to update when the workbook is opened, by me or any other user. 我不希望我或任何其他用户在打开工作簿时更新这些内容。

I have tried to achieve this with the simple work book open command below: 我尝试使用下面的简单工作簿打开命令来实现此目的:

Private Sub Workbook_Open()
    Workbook.UpdateLinks = xlUpdateLinksNever
End Sub

Am I missing something ? 我想念什么吗?

Put the code in the ThisWorkbook: 将代码放在ThisWorkbook中:

在此处输入图片说明

Private Sub Workbook_Open()
    Me.UpdateLink = xlUpdateLinksNever
End Sub

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM