1. Enable Macros
2. Record macro (Passbreak after entering macro name)
3. View macro---Edit
4.vb Editor Delete system automatically generated code enter the following code, save
5. Run the macro
The code is as follows:
Sub Passbreak ()
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 = 66:for j = 66:for k = 66
For L = 66:for m = 66:for I1 = 66
For i2 = 66:for i3 = 66:for I4 = 66
For i5 = 66:for I6 = All to 66:for n = 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
Excel password protection