Save as

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi, is there any way I can put a password on save as, I have a work book
other people use and some how they keep saving as by accident, it happens
when they use F5 to go to a sheet, any ideas on the password or how they are
managing to go to save as?

Thank you in advance, Barry.
 
The ususal culpret for that is selecting File -> Save As , instead of File ->
Save. You can add this code to the ThisWorkbook module...

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
If SaveAsUI = True Then
If MsgBox("You selected Save As. Is that what you wanted to do?", _
vbYesNo + vbDefaultButton2) = vbNo Then Cancel = True
End If
End Sub
 
The easiest way to get there is to right click the XL icon next to the word
Fle in the XL menu. Select View Code... paste the code from my previous post.
 
Hi Jim,
I tried it in a blank workbook and it works great.
Thank you,

Barry.
 

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

Back
Top