prevent workbook open password being applied

Emjaye

Board Regular
Joined
Oct 3, 2003
Messages
89
I have one user who invariably insists on applying a password to everything, even common files; I want to try and stop them from doing so....
On this occasion I'm not "forcing" my users into enabling macro for this particular project - there's no advantage to do so,

Does anybody know of a relatively easy way to ensure the workbook open/saveas password cannot be applied by any users?
When macro are enabled I do it by cancelling the SaveAs event.

Alternatively... what is the VBA required to remove WB open password that has been applied? (that could go into the WB open event)
I've come with up with the possible (untested) solution below, placed in the WB_beforesave event, so that when macro are enabled it stops the password being applied....

(1) kill thisworkbook.fullname
and then
(2) thisworkbook.saveas filename:= thisworkbook.name, password:=""

any thoughts gratefully received, thanks
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).

HalfAce

MrExcel MVP
Joined
Apr 6, 2003
Messages
9,454
Hello Emjaye
Please see Von Pookie's announcement at the very top of the Excel Questions forum
(titled "Password Breaking (Edited for clarification)"

I have no reason to think you aren't completely legitimate in your request (in fact I can
sympathize with you, I have one particular uncooperative, bent headed user myself. - Makes
you just want to slap some sense into them sometimes :unsure: ), however we've agreed for
the sake of the board's integrity not to deal with password breaking/bypassing issues.
 

Forum statistics

Threads
1,136,878
Messages
5,678,312
Members
419,754
Latest member
LordEddard

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