0
With ThisWorkbook.Worksheets("test")
Lastrow = .Cells(.Rows.count, 2).End(xlUp).Row
For i = LBound(sPrincipal) To (UBound(sPrincipal) - 3)
.Cells((Lastrow + 1), 1) = sPrincipal(i)
.Cells((Lastrow + 1), 2) = sInterest(i)
.Cells((Lastrow + 1), 3) = sBalance(i)
Lastrow = Lastrow + 1
Next i
End With
大約有10萬行(列數多於此處顯示的數量)需要定期填寫,並且需要加快速度,因爲這需要超過2-3小時。任何人都可以建議是否有辦法加快這個過程。提前致謝。在VBA中提高時間
什麼是sprrinciple?範圍?數組?變量?是其他變量是相同類型的嗎? – Degustaf
您的代碼的慢位將與表單交互,將其全部讀入數組,然後輸出作爲一個互動,你也可以使用screnupdating和計算,但是記得在 – 99moorem
@Degustaf之後重新打開它們對不起,這些都是數組。 – Meesha