disable ctrl+s

  • Thread starter Thread starter susie
  • Start date Start date
S

susie

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.
 
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
 
Back
Top