I have some Excel 2003 Macros that run 5 or 6 times slower in Excel 2007 / 2010. (Not sure how Microsoft accomplished such a wonderful feat!)
That speed is just not acceptable.
PLEASE Does anyone have any pointers for me on how to speed it up?
THANKS!
-----------------------------
Sub Test()
Dim I As Integer
With Application
.Iteration = False
.MaxChange = 0.001
.Calculation = xlCalculationManual
.ScreenUpdating = False
End With
ActiveWorkbook.PrecisionAsDisplayed = False
Calculate
For I = 1 To 500
Application.StatusBar = I
Range("c_assetloop").Value = I
Range("calc_mtginfo").Calculate
Range("newcell).value = Range("oldcell").value ' single cell
Range("Calc_Fillmtgdata").Calculate
Application.Goto reference:="Calc_MtgCfSheet"
ActiveSheet.Calculate
'=============================================
'THIS IS THE LINE THAT CAUSES THE SLOW DOWN
' CFS_TO and CFS_from are 10 x 120 arrays.
' CFS_TO is not referenced by any other cells
'=============================================
Range("cfs_to").Value = Range("cfs_from").Value
'=============================================
Next I
Application.StatusBar = False
Application.Calculation = xlAutomatic
Calculate
End Sub
That speed is just not acceptable.
PLEASE Does anyone have any pointers for me on how to speed it up?
THANKS!
-----------------------------
Sub Test()
Dim I As Integer
With Application
.Iteration = False
.MaxChange = 0.001
.Calculation = xlCalculationManual
.ScreenUpdating = False
End With
ActiveWorkbook.PrecisionAsDisplayed = False
Calculate
For I = 1 To 500
Application.StatusBar = I
Range("c_assetloop").Value = I
Range("calc_mtginfo").Calculate
Range("newcell).value = Range("oldcell").value ' single cell
Range("Calc_Fillmtgdata").Calculate
Application.Goto reference:="Calc_MtgCfSheet"
ActiveSheet.Calculate
'=============================================
'THIS IS THE LINE THAT CAUSES THE SLOW DOWN
' CFS_TO and CFS_from are 10 x 120 arrays.
' CFS_TO is not referenced by any other cells
'=============================================
Range("cfs_to").Value = Range("cfs_from").Value
'=============================================
Next I
Application.StatusBar = False
Application.Calculation = xlAutomatic
Calculate
End Sub
Last edited: