Disallow Save As feature

shahravi14

New Member
Joined
Dec 13, 2011
Messages
4
Hi Everyone,

I have a workbook which I built up on my own for me & my office colleagues. Its a very useful for all of us and because it contains very confidential data I also password protected it but now I want to even protect this workbook such that nobody can remove the password and copy it to other location and also get to know what are the formulas and functions that I used in this workbook.
At the same time I don't want to restrict them to use this workbook for their daily use. So how do I disable the SAVE AS feature?
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
enter the code below into your 'ThisWorkbook' module

Code:
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
If SaveAsUI = True Then Cancel = True
End Sub

the saveasui will be true if the Save as user interface is opened (by clicking 'save as'), the cancel variable is true when pressing the cancel button.
 
Upvote 0
oh and dont forget to password protect the VBProject. unfortunatly the above code can still be bypassed by going into design mode or having macros disabled
 
Upvote 0

Forum statistics

Threads
1,223,901
Messages
6,175,277
Members
452,629
Latest member
SahilPolekar

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
Back
Top