What's the safest way to NOT allow user from Saving

APPPRO

Active Member
Joined
Aug 6, 2002
Messages
256
I don't want the user the ever "Save"

Save As is OK.

Any thoughts?
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.

Richie(UK)

MrExcel MVP
Joined
May 17, 2002
Messages
3,329
Hi,

How about:
<pre>Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
If Not SaveAsUI Then Cancel = True
End Sub</pre>
In the ThisWorkbook module.

HTH
 

Mark W.

MrExcel MVP
Joined
Feb 10, 2002
Messages
11,654
How about using a Modify password and setting the Read-only recommended option? See the Excel Help topics for "Set properties to make a workbook read-only", "Protect workbooks and worksheets from changes", and "Require a password to save changes to a workbook".
 

APPPRO

Active Member
Joined
Aug 6, 2002
Messages
256
neither works.

1st idea - it still saves when you click the save icon button

2nd is no good cause can't be read only

any macros that Stop the Save???
 

Mark O'Brien

MrExcel MVP
Joined
Feb 15, 2002
Messages
3,530

ADVERTISEMENT

<pre>
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Cancel = True
End Sub</pre>

The only problem with this is that you can't save your workbook to distribute it.
 
L

Legacy 11273

Guest
On 2002-10-21 17:41, APPPRO wrote:
1st idea - it still saves when you click the save icon button

The procedure supplied by Richie(UK) works.

Are you putting it in the ThisWorkbook module?

You might want to add a message :-

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
If Not SaveAsUI Then
Cancel = True
MsgBox "Changes to this workbook cannot be saved. Use SaveAs instead."
End If
End Sub
This message was edited by Bali on 2002-10-21 18:01
 

APPPRO

Active Member
Joined
Aug 6, 2002
Messages
256

ADVERTISEMENT

GREAT!!!!

Had it in wrong module.

terrific
 

APPPRO

Active Member
Joined
Aug 6, 2002
Messages
256
Working great - especially the message too. love that.

BUT you can save the workbook. yeah yeah save as.

got to remmeber.

thanks again
 

stevebausch

Well-known Member
Joined
May 11, 2002
Messages
810
depends how obsessive you are.

It is possible to run Windows from a CD.
It is possible to set up a RAM drive.
And of course, Using Window NT or 2000, you can 'Lock Down' the workstation so nothing can be saved.

I think the real path is to use a operating system that you can lock down.
 

brettvba

MrExcel MVP
Joined
Feb 18, 2002
Messages
1,030
Whats the difference to having SaveAs only you can still save the file by just not changing the filename!

Brett
 

Forum statistics

Threads
1,144,214
Messages
5,723,057
Members
422,476
Latest member
beck85

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top