Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
disable ctrl+s
My excel application needs to disable short cut key ctrl+s.
Is there a function that allow me to disable the short cut key so that my user will not allowed to use the short cut key when they are not suppose to save the file to the wrong folder. Thanks. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
disable ctrl+s
Susie,
You could disable any save by putting the below code in the ThisWorkbook module. The msg part allows saving if the user knows the password. steve Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) Dim msg As String msg = InputBox("Enter password to save") If msg = "pswrd" Then Exit Sub Else Cancel = True End If End Sub "John Michl" wrote in message ... One quick way would be to record a macro that does nothing and assign it to ctrl-s. For instance, start the macro recorder, assign a name of DisableS and a shortcut of Ctrl-s. While it is recording do something simple like click on any cell, then stop the recorder. Edit the macro and eliminate or comment out any code between the Sub and End Sub statements so that code looks something like the following. You might want to put a message box in so that users get a brief message saying that Ctrl-s is diabled. Sub Macro1() ' ' Macro1 Macro ' Macro recorded 7/24/2003 by John A. Michl ' ' Keyboard Shortcut: Ctrl+s ' ' Sheets(Sheet1).Range("A1").Select MsgBox("Please note Ctrl-s is disabled.) End Sub Hope that helps. - John Michl "susie" wrote in message ... My excel application needs to disable short cut key ctrl+s. Is there a function that allow me to disable the short cut key so that my user will not allowed to use the short cut key when they are not suppose to save the file to the wrong folder. Thanks. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Is there a difference between CTRL+D and CTRL+" (quotation marks) | Excel Discussion (Misc queries) | |||
How to make Ctrl-C, ctrl-V work in Office 2007 | Excel Discussion (Misc queries) | |||
Excel 2007: Ctrl+PgUp or Ctrl+PgDn with Protected Sheets | Excel Discussion (Misc queries) | |||
disable CTRL-pageup & pagedown | Excel Discussion (Misc queries) | |||
Disable CTRL+D??? | Excel Discussion (Misc queries) |