Restrict users from changing password

G

Guest

Lets say I have a file that is on a shared drive that multiple users use. The
file is not saved as a shared workbook. The file is password protected and
all users know password. Is there a way to restrict the users from changing
the password when they are re-protecting the workbook after they have made
changes?

I also have found that if I protect a work book some one who has the
password can then protect and share the work book putting a new password over
mine thus now not allowing me to edit the workbook. Is there any way to
restrict users from doing this?
 
G

Guest

Personally, in that situation, I think I would keep multiple secure backups
of my own, to restore things as needed. In addition, I would investigate
installing a "Before Save" macro that would, if necessary, copy all the data
to a secure filename and save it with the proper password. This file can
then be copied and re-named and placed for use.

BTW, if everyone who uses the file knows the password, and must un-protect
the file before using it..........what's the point of the password? Why not
just put the file in a secure directory that only your approved users have
access to?

hth
Vaya con Dios,
Chuck, CABGx3
 
G

Guest

What should this "before save" macro and "secure & replace" macro look like?
Can you help me with that.
 
G

Guest

Well, it got a little sticker than I thought..........In my XL97 I had to do
it this way.....
First, a "Before Save" macro to call a macro in a regular module

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Call UnProtectSheet
End Sub

Then, the macro in a regular module.........

Sub UnProtectSheet()
Cells.Select
Selection.Copy
Workbooks.Add
ActiveSheet.Paste
Range("A1").Select
Application.CutCopyMode = False
ActiveSheet.Protect DrawingObjects:=True, Contents:=True,
Scenarios:=True, password:="chuck"
ActiveWorkbook.SaveAs FileName:="C:\MySecureFile.xls",
FileFormat:=xlNormal _
, password:="", WriteResPassword:="", ReadOnlyRecommended:=False, _
CreateBackup:=False
ActiveWindow.Close
Range("a1").Select
End Sub

I had to do it this way because for some reason the "Activesheet.paste"
statement would not work if the whole thing was put in the "Before Save"
module.......anyway, this works and when your user starts to save, even tho
he has protected the sheet with a different password than you wish, this
macro will copy the sheet to a new file called "MySecureFile" (which you can
change) and re-protect it with your old password (I used "chuck" in the code
which you can change). You can then copy it over the file that he saved with
his password if you wish.

hth
Vaya con Dios,
Chuck, CABGx3
 

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

Top