軟體:Excel
版本:2007
On Error Resume Next的用法大家都知道的
我現在的需求是,如果出現報錯,除了當句跳過以外
還要多跳過二句
例如
orkbooks.Open Filename:=MM & "\ntrade.xls"
Range(Cells(6, "A"), Cells(100, "I")).Copy
ThisWorkbook.Activate
Sheets("ntrade").Select →這句出現報錯
[A2].Select
Selection.PasteSpecial Paste:=xlValues
Workbooks.Open Filename:=MM & "\comm.xls" →希望接下來執行這句
Range(Cells(6, "A"), Cells(100, "I")).Copy
ThisWorkbook.Activate
Sheets("comm").Select
[A2].Select
Selection.PasteSpecial Paste:=xlValues
請賜教
謝謝