Option Explicit
Sub Test()
Dim ABC As Workbook
Dim XYZ As ThisWorkbook
With Application
.ScreenUpdating = False
.EnableEvents = False
.DisplayAlerts = False
End With
Set XYZ = ThisWorkbook
Set ABC = Workbooks.Open("F:TestABC.csv")
With ABC
.Copy After:=XYZ.Sheets(XYZ.Sheets.Count)
.Close False
End With
With Application
.ScreenUpdating = True
.EnableEvents = True
.DisplayAlerts = True
End With
End Sub
与美国广播公司 .复制后:=XYZ。片材(XYZ.表数) .关闭假结尾为
在上面的行中,ABC是一个工作簿,ABC工作簿的工作表引用在哪里?
也使用工作表引用。
With ABC.Sheets("MySheet")
或
With ABC.Sheets(1)