我想運行一個宏來生成一個數據,但它最初工作,但現在它給出了一個錯誤,「subscipt超出範圍」。我需要幫助:運行時錯誤,下標超出範圍
Sub paste()
'
' paste Macro
'
Application.ScreenUpdating = False
Application.Calculation = xlManual
MyPath = ThisWorkbook.Path
Sheets("Raw_Data_Agent").Visible = True
Sheets("Raw_Data_Agent").Select
Columns("B:P").Select
Selection.ClearContents
Workbooks.Open Filename:=MyPath & "\Raw_Data_Agent.xls"
Columns("A:O").Select
Selection.Copy
Workbooks("Real Time Agent AHT And Login Tracker").Activate
Sheets("Raw_Data_Agent").Select
Range("B1").Select
ActiveSheet.paste
Sheets("Raw_Data_Agent").Visible = False
Workbooks("Raw_Data_Agent").Activate
Application.DisplayAlerts = False
ActiveWorkbook.Close False
Sheets("AM And Process Wise").Select
Calculate
ActiveWorkbook.RefreshAll
Application.ScreenUpdating = True
End Sub
此腳本在哪一行中斷? – Taosique
工作簿(「Real_Time_Agent_AHT_And_Login_Tracker」)。激活 – user3275237
工作簿(「Real_Time_Agent_AHT_And_Login_Tracker」)。激活,此處突破 – user3275237