white_flag
Active Member
- Joined
- Mar 17, 2010
- Messages
- 331
Hello
I have an macro that will make some calculation on entire workbook. But take some time till finish the calculation (around 3 sec). If I hit the ESC key in this time I have an window with code execution was been interrupted >> Continue ..etc.
I like to tell to excel, wen the macro start, to do not stop wen the ESC key has been press (to give that message)
I putted like this but it is not working:
I have an macro that will make some calculation on entire workbook. But take some time till finish the calculation (around 3 sec). If I hit the ESC key in this time I have an window with code execution was been interrupted >> Continue ..etc.
I like to tell to excel, wen the macro start, to do not stop wen the ESC key has been press (to give that message)
I putted like this but it is not working:
Code:
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Excel.Range)
Application.OnKey "{ESC}", "NoChange"
If Sh.Name = "Calculation" Then Worksheet_Calculate
End Sub