|
Sub step1_ClearTemplate()
Dim rw As Long
Application.ScreenUpdating = False
ThisWorkbook.Worksheets("BPopen Journal report").Activate
Sheet1.UsedRange.Select
Selection.Delete
ThisWorkbook.Worksheets("SAP Journal Report FB03").Activate
rw = ThisWorkbook.Worksheets("SAP Journal Report FB03").Range("C6").End(xlDown).Row
Sheet2.Range("C6:N" & rw).Select
Selection.Delete Shift:=xlUp
Sheet2.Range("O:AO").Select
Selection.Delete Shift:=xlUp
ThisWorkbook.Worksheets("SAP Entries_S_ALR_87012289").Activate
rw = ThisWorkbook.Worksheets("SAP Entries_S_ALR_87012289").Range("C2").End(xlDown).Row
Sheet3.Range("C2:L" & rw).Select
Selection.Delete Shift:=xlUp
Application.Wait Now + TimeValue("00:00:02")
Sheet3.Range("M:AV").Select
Selection.Delete Shift:=xlUp
ThisWorkbook.Worksheets("Journals above threshold limit").Activate
rw = ThisWorkbook.Worksheets("Journals above threshold limit").Range("A3").End(xlDown).Row
Sheet5.Range("A4:J" & rw).Select
Selection.Delete Shift:=xlUp '程序运行到此处出错,提示类Range的Delete方法无效,我的问题是为何前面几段这样写运行没问题到了这段却运行不了,请问有什么方法修改?
ThisWorkbook.Worksheets("Review Summary").Activate
Worksheets("Review Summary").Range("A1").Select
ThisWorkbook.Save
Application.ScreenUpdating = True
MsgBox "Please go to Step 3_import source data"
End Sub
|
|