XL98: Worksheet Protection May Be Removed Without a PasswordLast reviewed: April 6, 1998Article ID: Q183504 |
The information in this article applies to:
SYMPTOMSWhen you protect a worksheet and type a password in the Protect Sheet dialog box, you can disable the protection programmatically without using the password.
CAUSEYou can remove the password protection on a worksheet programmatically when both of the following conditions are true:
RESOLUTIONTo resolve this problem, select all three protection options when you protect a particular worksheet.
STATUSMicrosoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article.
MORE INFORMATIONMicrosoft provides programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes that you are familiar with the programming language being demonstrated and the tools used to create and debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific needs. If you have limited programming experience, you may want to contact the Microsoft fee-based consulting line at (800) 936-5200. For more information about the support options available from Microsoft, please see the following page on the World Wide Web:
http://www.microsoft.com/support/supportnet/refguide/default.aspThe following sample macro removes worksheet protection when you do not select all the worksheet protection options:
Sub Test()
ActiveSheet.Protect
ActiveSheet.Unprotect
End Sub
Instead of removing protection on a worksheet, you may decide to change the
password. Assuming you protect a worksheet with a password, and you do not
select one or more of the protection options, you can change the protection
password for the worksheet with the following macro:
Sub Test2()
ActiveSheet.Protect password:="<new password>"
End Sub
|
Additional query words: XL98
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |