Disabling Save

  • Thread starter Thread starter Edgar
  • Start date Start date
E

Edgar

Hi Guys

Is it possible to Disable the Save feature in Excel
through code while a wb is open and then to turn it off
again when the user closes the wb?

TIA
 
Hi
not bullet proof but you may put the following code in your workbook
module (not in a standard module)


Private Sub Workbook_BeforeClose(Cancel As Boolean)
appplication.EnableEvents = False
Me.Save
appplication.EnableEvents = False
End Sub

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
Cancel = True
End Sub


this won't allow saving a workbook until it's closed
 

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