Saving a Workbook

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

Guest

Hello

Is it possible to open a new workbook and make it impossible for the user to save the new workbook. Also let them know that they can't save it

Thanks in advance
James
 
Hi
you could use the BeforeSave event of your workbook for this (note:
this is not totally bullet proof. e.g. the user disables macros).
Put the following code in your workbook module:
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
msgbox "Saving not allowed"
Cancel = True
End Sub

Or just create the workbook as readonly (protect this with a password)
 
There's no bullet proof way to stop a user saving an
excel workbook. For example they could open it with
macros disabled ... so any event driven code would not
work.

What we do is give the user a shortcut to the excel
workbook and then write protect the workbook. This
prevents the user from writing over the "production" copy
of the workbook while it doesn't prevent them saving a
copy with a different name

HTH

Patrick Molloy
Microsoft Excel MVP
-----Original Message-----
Hello,

Is it possible to open a new workbook and make it
impossible for the user to save the new workbook. Also
let them know that they can't save it!
 

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