在下面的VBA脚本中获取.MoveLast语句的自动化错误。
CursorLocation = adUseClient
Dim rngDst As Range
Set rngDst =ThisWorkbook.Sheets("ALM_Scenario_Detailed_Temp").Range("A2")
With mrs
If Not .BOF And Not .EOF Then
.MoveLast
.MoveFirst
While Not .EOF
For i = 0 To .Fields.Count - 1
rngDst.Offset(, i) = .Fields(i).Value
Next i
mrs.MoveNext
Set rngDst = rngDst.Offset(1)
Wend
End If
End With