How to remove Excel password protection

Source: Internet
Author: User
Tags chr password protection

Excel pops up "The cell or chart you are trying to change is protected and therefore read-only." To modify a protected cell or chart, use the Undo Sheet Protection Command (in the Change group on the Review tab) to unprotect it. You may be prompted to enter a password. window, as shown in Figure 1.

In this case, how should we solve it? After research, two methods of solving Excel worksheet protection Code are found.

One, VBA macro code crack method:

Step one: Open the file, and first remove the default macro disabled state by tapping the options Status button under the toolbar, opening the Microsoft Office Security Options window, selecting "Enable this content" and "OK" exit (Figure 2);

Then switch to the "View" tab, click "Macros" → "Record Macro", the "Record New Macro" window, in the "macro name" to define a name: Passwordbreaker (Figure 3), click "OK" exit;

Step two: Then click "Macros" → "View Macros", select "Passwordbreaker" under "Macro name" and click "Edit" to open the Microsoft Visual Basic Editor to replace all the code in the right window with the following:

Sub Passwordbreaker ()

Dim I As Integer, J As Integer, K as Integer

Dim l As Integer, M as Integer, n as Integer

Dim i1 As Integer, I2 As Integer, i3 as Integer

Dim I4 As Integer, i5 as Integer, I6 as Integer

On Error Resume Next

For i = the 66:for j = to 66:for K = 66

For L = 66:for m = 66:for to I1 = 66

For i2 = 66:for i3 = 66:for I4 = 66

For i5 = 66:for I6 = 66:for n = $ to 126

ActiveSheet.Unprotect Chr (i) & Chr (j) & Chr (k) & _

CHR (L) & Chr (M) & Chr (I1) & Chr (I2) & Chr (i3) & _

Chr (I4) & Chr (i5) & Chr (I6) & CHR (n)

If activesheet.protectcontents = False Then

MsgBox "One usable password is" & Chr (i) & Chr (j) & _

Chr (k) & Chr (L) & Chr (M) & Chr (I1) & Chr (I2) & _

CHR (i3) & Chr (I4) & Chr (i5) & Chr (I6) & CHR (n)

ActiveWorkbook.Sheets (1). Select

Range ("A1"). FORMULAR1C1 = Chr (i) & Chr (j) & _

Chr (k) & Chr (L) & Chr (M) & Chr (I1) & Chr (I2) & _

CHR (i3) & Chr (I4) & Chr (i5) & Chr (I6) & CHR (n)

Exit Sub

End If

Next:Next:Next:Next:Next:Next

Next:Next:Next:Next:Next:Next

End Sub

Step three: click "Macros" → "View Macros", select "Passwordbreaker" under "Macro name" and click "Execute", and the password will be visible (Figure 4).

Step Fourth: Switch the Review tab, click Unprotect Sheet, and then enter the password to unlock it.

Note : More wonderful tutorials Please pay attention to the triple computer tutorial section, triple Computer office group: 189034526 welcome you to join

Classification:
  • Excel Tutorials

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.