我的宏的一部分使用修剪功能。它恰好是我的宏的最慢的部分,我正在加速它。有人有一些代碼可以達到相同的目的,但更快的建議嗎?如何加快修剪宏
Sub Trim()
For Each c In Sheets("Approved Closing Data Draw").UsedRange c.Value = WorksheetFunction.Trim(c.Value) Next c
For Each c In Sheets("Pipeline - Underwriting Data D").UsedRange c.Value = WorksheetFunction.Trim(c.Value) Next c
For Each c In Sheets("Modifications").UsedRange c.Value = WorksheetFunction.Trim(c.Value) Next c
For Each c In Sheets("Lead Data").UsedRange c.Value = WorksheetFunction.Trim(c.Value) Next c
Sheets("Approved Closing Data Draw").Select
End Sub
這看起來更像是一個代碼審查的問題... HTTP://codereview.stackexchange .COM / – Rdster