-
You have to break the Excel file is closed, must remember to shut it! Then create a new Excel file
-
This opens a new Excel, press the alt + F11, vb open interface, a new module, shown in FIG.
-
Copy the code into this module, the code is as follows:
Private Sub VBAPassword () 'solution Excel file path you want to protect ( save to crack excel XLS to 2003-97 )
Filename = Application.GetOpenFilename ( "Excel file (*. . xls & * .xla & * .xlt ), * xls;. * xla;. * xlt ",," VBA crack ")
the If Dir (Filename) =" "the Then
MsgBox" did not find the relevant documents, clear reset. "
Exit Sub
Else
the FileCopy Filename, Filename &" .bak " 'backup files.
End the If
Dim the GetData of As String *. 5
the Open Filename the For Binary of As #. 1
Dim CMGs of As Long
Dim DPBO of As Long
the For I =. 1 the To LOF (. 1)
the Get #. 1, I, the GetData
the If the GetData = "CMG =" "" the Then CMGs I =
the If the GetData = "[the Host" the Then DPBO = I - 2:
Sub the Exit
End the If
Dim St * 2 of As String
Dim S20 of As String *. 1
'to obtain a hexadecimal string 0D0A
the Get #. 1, CMGs - 2, St
' to obtain a string of 20 hexadecimal
Get # 1, DPBo + 16, S20
'replacing the code encryption machine part
the For I = CMGs the To DPBO the Step 2
of Put #. 1, I, St
the Next
' unpaired symbol added
the If (DPBO - CMGs) Mod 2 <> 0 the Then
of Put #. 1,. 1 + DPBO , S20
End the If
MsgBox "file decryption is successful ......" 32, "suggesting"
use Close # 1
End Sub
Method Two: Excel 2016 VBA project password cracker
Guess you like
Origin www.cnblogs.com/jacklong-yin/p/11227941.html
Recommended
Ranking