我的代码有问题。即使我已经包含这些代码,Excel仍会显示更新链接提示:
Workbooks(ActiveWorkbook.Name).UpdateLinks = xlUpdateLinksNever
AppExcel.AskToUpdateLinks = False
我做错了吗?
以下是我的代码片段:
ActiveWorkbook.SaveCopyAs dirName & "\" & folderName & "\" & ActiveWorkbook.Name
Workbooks(ActiveWorkbook.Name).UpdateLinks = xlUpdateLinksNever
AppExcel.AskToUpdateLinks = False
Workbooks(ActiveWorkbook.Name).Close False
谢谢!
答案 0 :(得分:1)
我已经做对了! :)但是,谢谢你的帮助。我只需要放UpdateLinks:=True
Set wb = Workbooks.Open(fileName:=fileName, UpdateLinks:=True)
答案 1 :(得分:0)
请改为尝试:
Sub Auto_Open()
UpdateLinks = xlUpdateLinksNever
AskToUpdateLinks = False
End Sub