Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
How to: Remove Protection from Worksheets
Collapse the table of content
Expand the table of content

How to: Remove Protection from Worksheets

NoteNote

Some code examples in this topic use the this or Me keyword or the Globals class in a way that is specific to document-level customizations, or they rely on features of document-level customizations such as host controls. These examples can be compiled only if you have the required applications installed. For more information, see Features Available by Product Combination.

The Unprotect method removes protection from a Microsoft Office Excel 2003 worksheet.

The following example uses the variable getPasswordFromUser, which contains a password obtained from the user. It also assumes that you are working with a worksheet named Sheet1.

To unprotect a Worksheet

  • Call the Unprotect method of the worksheet and pass in the password, if required.

    Globals.Sheet1.Unprotect(getPasswordFromUser);
    
    

See Also

Community Additions

ADD
Show:
© 2015 Microsoft