ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Disabling the Key board shortcuts (https://www.excelbanter.com/excel-programming/358711-disabling-key-board-shortcuts.html)

rags

Disabling the Key board shortcuts
 
Hi all,

I have tried with the following code Application.OnKey "^{s}", "".
but when i enter any data in the sheet and press "Ctrl S" then the
changes will be applied to the sheet.

i want to disable "ctrl S" completely. please help me out.....


Tom Ogilvy

Disabling the Key board shortcuts
 
these worked for me:

Sub StopCtrlS()
Application.OnKey "^s", ""
End Sub

Sub RestoreCtrlS()
Application.OnKey "^s"
End Sub

but you have to Execute the code to effect the change.

--
Regards,
Tom Ogilvy




"rags" wrote:

Hi all,

I have tried with the following code Application.OnKey "^{s}", "".
but when i enter any data in the sheet and press "Ctrl S" then the
changes will be applied to the sheet.

i want to disable "ctrl S" completely. please help me out.....




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

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