忽略“此工作簿包含指向其他数据源的链接”

我打开VBA中的文件,并希望通过代码打开我的文件后忽略上述消息。 这是我不想更新文件,并希望继续运行的代码。 我该怎么做? 我打开多个文件,我需要等待每个文件来显示,而我想我可以通过代码来完成。

filter = "Text files (*.xls*),*.xls*" Caption = "Please Select the a file" Ret = Application.GetOpenFilename(filter, , Caption) If Ret = False Then Exit Sub Set wb = Workbooks.Open(Ret) 

Application.displayAlerts = False不适用于此。 有没有pipe理它? 谢谢。

尝试这个:

 Private Sub Workbook_Activate() Application.AskToUpdateLinks = False End Sub 

资源