Summary up front: If I change the number value in a cell manually (can be integer 1 to10) the workbook recalculates near instantaneously. If I use a combobox to select the value (1 to 10) and simple one line VBA code to replace the value in that same cell, the workbook takes 3 - 4 seconds to recalculate.
VBA Code:
Private Sub ETO_Temp_Roll_Change()
Application.EnableEvents = False
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
turn_column = Range("I5") + 2
If Activate_Die_Rollers.Value Then Sheets("Zones").Cells(5, turn_column).Value = ETO_Temp_Roll.Value Else ETO_Temp_Roll.Value = Sheets("Zones").Cells(5, turn_column).Value
Application.Calculation = xlCalculationAutomatic
Application.EnableEvents = True
Application.ScreenUpdating = True
End Sub
ETO_Temp_Roll is a combobox allowing user to choose values 1 - 10. The simple code above replaces cell (5, turn_column) in worksheet "Zones" with the value selected by the user with the ETO_Temp_Roll combo box.
If I manually enter a new value (1 to 10) in any cell in Sheets("Zones"), the entire workbook (10,000s simple formulas and some conditional formatting) recalculates near instantaneously.
If I use the ETO_Temp_Roll combobox dropdown to enter the same value in the same cell, via the above code, the workbook takes 3 - 4 seconds to recalculate.
How could the recalculation time depend on the method used to change the data in the cell? I would think that once the cell value was changed, the Excel recalculation process would the same, no matter what method was used to change the data. I have watched the cell while executing the VBA code via the combobox -- the value in the cell changes instantly upon clicking the combobox.
VBA Code:
Private Sub ETO_Temp_Roll_Change()
Application.EnableEvents = False
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
turn_column = Range("I5") + 2
If Activate_Die_Rollers.Value Then Sheets("Zones").Cells(5, turn_column).Value = ETO_Temp_Roll.Value Else ETO_Temp_Roll.Value = Sheets("Zones").Cells(5, turn_column).Value
Application.Calculation = xlCalculationAutomatic
Application.EnableEvents = True
Application.ScreenUpdating = True
End Sub
ETO_Temp_Roll is a combobox allowing user to choose values 1 - 10. The simple code above replaces cell (5, turn_column) in worksheet "Zones" with the value selected by the user with the ETO_Temp_Roll combo box.
If I manually enter a new value (1 to 10) in any cell in Sheets("Zones"), the entire workbook (10,000s simple formulas and some conditional formatting) recalculates near instantaneously.
If I use the ETO_Temp_Roll combobox dropdown to enter the same value in the same cell, via the above code, the workbook takes 3 - 4 seconds to recalculate.
How could the recalculation time depend on the method used to change the data in the cell? I would think that once the cell value was changed, the Excel recalculation process would the same, no matter what method was used to change the data. I have watched the cell while executing the VBA code via the combobox -- the value in the cell changes instantly upon clicking the combobox.