Password protection protection!

Status
Not open for further replies.

Andy Gee

New Member
Joined
Feb 26, 2002
Messages
48
I have some password protected worksheets which need to be shared with various users to enter data. Sometimes people find it ammusing to change the password! Is there a way I can stop them from changing the password?

Any help please as it takes hours to crack the password and I can't stop people doing it!
This message was edited by Andy Gee on 2002-02-27 07:08
 
Also if the user chose to disable the macro when opening the workbook, will any of the VBA methods such as the "Save As disable" work? Thanks.
 
Upvote 0

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
You would need to create a button from the form tool bar then right click on the button and goto assign macro then assign it to Joes code above...

Btw what stops someone from disabling macros then doing a saveas?

Brett
 
Upvote 0
Thanks. I don't think there's a way to stop someone from disabling the macro when he opens the workbook. It's part of the Excel virus protection tool. Is that correct? In that case, someone can just disable the macro and none of these VBA protection will work. Correct?
 
Upvote 0
Simon,

There are ways of forcing ppl to enable macros(if they want to use the wkb)

U can hide all the sheets and unhide them with macro on entry(makes it useless unless macros are enabled)
Make the file an addin(if no saving is needed) this then forces enable as well to use the wkb

Brett
 
Upvote 0
This is the unhide code I came up with:

Private Sub auto_open()
Sheets("Sheet1").Visible = True
End Sub

But how do you stop the user from manually unhiding the worksheet if they disable the macro?
 
Upvote 0
Hi simon

To stop manual unhidation.

sheets("sheet1").visible = xlveryhidden

to unhide

sheets("sheet1").visible = xlsheetvisible

when the sheet is set to xlveryhidden the sheet can then only be opened from the vba explorer(so u need to password this as well)

set the sheets to unhide on open
<code>
sub Auto_Open
'your code here
end sub
</code>
 
Upvote 0
This is what I came up with:

Private Sub auto_open()
Sheets("Sheet2").Visible = xlSheetVisible
Sheets("Sheet3").Visible = xlSheetVisible
Sheets("Sheet1").Visible = xlVeryHidden
End Sub

Private Sub auto_close()
Sheets("Sheet1").Visible = xlSheetVisible
Sheets("Sheet2").Visible = xlVeryHidden
Sheets("Sheet3").Visible = xlVeryHidden
End Sub

Basically if they Enable the Macro, they won't see Sheet1 until after they close the workbook. If they Disable the Macro, they'll see Sheet1. Sheet1 contains the warning to reopen the workbook with Macro Enable.

Thanks for all your help, amigo. :cool:
 
Upvote 0
The warning page is there because a workbook cannot be opened with no worksheet shown.
 
Upvote 0
Oh, one minor glitch. Using this code, when the workbook is closed, all the worksheets are rehidden and the warning page is display. The problem is that instead of closing the workbook right away after Sheet1 is redisplay, I got a message asking me to save the changes or not. How do I disable this message?
 
Upvote 0
Status
Not open for further replies.

Forum statistics

Threads
1,214,827
Messages
6,121,823
Members
449,049
Latest member
cybersurfer5000

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