' 螢幕刷新,開啟
Application.ScreenUpdating = True
Application.Calculation = xlAutomatic
End Sub
-----------------------------------------
Sub 抓數據()
Dim strArr() As Variant
Dim I As Long, J As Long
Dim K As Long
workname = ThisWorkbook.Name
週數 = Sheets("工作表1").Range("AA2")
範圍1 = Sheets("工作表1").Range("AB2")
範圍2 = Sheets("工作表1").Range("AB3")
Sheets(週數).Select
strArr() = Range("S" & 範圍1 & ":AV" & 範圍2)
For J = 1 To 30
For I = 1 To 10
K = K + 1
strArr(I, J) = strArr(I, J) '& "(Change Index=" & K & ")"
Next I
Next J
ActiveWorkbook.Close True
Windows(workname).Activate