George J
Well-known Member
- Joined
- Feb 15, 2002
- Messages
- 959
I have the following code to switch the sheet calculation from Manual (done to speed up another macro - copy & paste lots of detail from other sheets), to Automatic.
I am not sure how to go about it, but am sure the onkey command is correct.
Private Sub Worksheet_calculate()
Application.OnKey "{F12}", "Calculate_Auto"
End Sub
I am wanting to press F12 to revert back to
Automatic calculation for the whole sheet. I know pressing F9 refreshes the calculations, but the option is still set to manual.
Sub Calculate_Auto()
'
' Calculate_Auto Macro
' Macro recorded 28/03/2002 by gj
'
'
With Application
.Calculation = xlAutomatic
.MaxChange = 0.001
End With
ActiveWorkbook.PrecisionAsDisplayed = False
End Sub
As I will be using this macro after other macros, I need it to be running in the background until F12 is pressed and the macro is run. I need this one spelled out for me I'm afraid.
Currently, pressing F12 brings up the "save as" screen.
Thanks in advance.
I am not sure how to go about it, but am sure the onkey command is correct.
Private Sub Worksheet_calculate()
Application.OnKey "{F12}", "Calculate_Auto"
End Sub
I am wanting to press F12 to revert back to
Automatic calculation for the whole sheet. I know pressing F9 refreshes the calculations, but the option is still set to manual.
Sub Calculate_Auto()
'
' Calculate_Auto Macro
' Macro recorded 28/03/2002 by gj
'
'
With Application
.Calculation = xlAutomatic
.MaxChange = 0.001
End With
ActiveWorkbook.PrecisionAsDisplayed = False
End Sub
As I will be using this macro after other macros, I need it to be running in the background until F12 is pressed and the macro is run. I need this one spelled out for me I'm afraid.
Currently, pressing F12 brings up the "save as" screen.
Thanks in advance.