disable ctrl+s

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.
 
S

steve

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top