Events
Apr 8, 3 PM - May 28, 7 AM
Sharpen your AI skills and enter the sweepstakes to win a free Certification exam
Register now!This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
You can programmatically remove protection from a Microsoft Office Excel worksheet.
Applies to: The information in this topic applies to document-level projects and VSTO Add-in projects for Excel. For more information, see Features available by Office application and project type.
The following example uses the variable getPasswordFromUser
, which contains a password obtained from the user.
Call the Unprotect method of the worksheet and pass in the password, if necessary. This example assumes that you are working with a worksheet named Sheet1
.
Call the Unprotect method of the active worksheet and pass in the password, if necessary.
Events
Apr 8, 3 PM - May 28, 7 AM
Sharpen your AI skills and enter the sweepstakes to win a free Certification exam
Register now!