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

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
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.
 
Upvote 0

Forum statistics

Threads
1,213,485
Messages
6,113,931
Members
448,533
Latest member
thietbibeboiwasaco

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