ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Lock Keyboard input (https://www.excelbanter.com/excel-programming/396874-lock-keyboard-input.html)

Alice

Lock Keyboard input
 
How do I Lock Keyboard input while running Macro? User can press Esc Key to
stop a Macro from running, how do I prevent this?

Halim

Lock Keyboard input
 
In my procedure i use this code ....
Sub DisableCancel()
Application.EnableCancelKey = xlDisabled
For i = 1 To 60000
Cells(i, 1) = i
Next
Application.EnableCancelKey = False
End Sub


just replace
For i = 1 To 60000
Cells(i, 1) = i
Next

by your code
--
Regards,

Halim



"Alice" wrote:

How do I Lock Keyboard input while running Macro? User can press Esc Key to
stop a Macro from running, how do I prevent this?



All times are GMT +1. The time now is 05:28 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com