Excel文件打开密码破解,适用于*.xls & *.xlsx文件,密码是数字的。
Sub crack()
Dim i As Long
i = 0
FileName = Application.GetOpenFilename("Excel文件(*.xls & *.xlsx),*.xls;*.xlsx", , "VBA破解")
If FileName = False Then Exit Sub
FileName = Right(FileName, Len(FileName) - InStrRev(FileName, ""))
Application.ScreenUpdating = False
line范队房煤序1: On Error GoTo line3
If i = 1000000 Then MsgBox "密码不是0-999999的自然数!": GoTo line2
***.Open FileName, , True, , i
Msg序印也Box "密码是 " & i
line2: Application.ScreenUpdating = True
Exit Sub
line3: i = i + 1
Resume line1
End Sub