我在运行此代码时遇到类型不匹配,即使我在下面编写时没有收到错误:
Set x = Workbooks.Open("C:\Exportbook.xlsx").UpdateLinks = xlUpdateLinksNever
甚至
Sub Comments()
Dim x As Workbook
Dim y As Workbook
Set x = Workbooks.Open("C:\Exportbook.xlsx"),UpdateLinks:=xlUpdateLinksUserSetting
Set y = ThisWorkbook x.Sheets("Tablets").Range("E10:AQ2000").Copy
y.Sheets("Tablets").Range("E10:AQ2000").PasteSpecial Paste:=xlPasteComments
x.Close SaveChanges:=False
End Sub
{{1}}
直到我添加了updatelink部分
才运行良好