下面提到的从一个工作簿到另一个工作簿的代码复制粘贴工作表保留了旧工作簿的公式引用。
请建议如何将代码修改为新工作簿引用。
Sub copypastesheet()
Application.DisplayAlerts = False
Dim x As Workbook, y As Workbook
Set x = Workbooks(abx.xlsx)
Set y = Workbooks(cbx.xlsx)
'for loop
For Each Sheet In x.Sheets
Sheet.Copy After:=y.Sheets(1)
Next
' newSheet.Name = "NewCopy"
Application.DisplayAlerts = True
End Sub