execl打開密碼忘記了,可以通過以下方式破解。不過破解只能搞定6位以下的密碼。過長的密碼是沒辦法搞定的。
打開vba編輯器(art+F11)。
粘貼如下代碼。點擊工具欄綠色△號。執行代碼。
Sub openIt()
Dim i As Long
Dim FileName As String
i = 0
FileName = Application.GetOpenFilename("Excel文件(*.xls & *.xlsx),*.xls;*.xlsx", , "VBA破解")
FileName = Right(FileName, Len(FileName) - InStrRev(FileName, "\"))
Application.ScreenUpdating = False
line2: On Error GoTo line1
Workbooks.Open FileName, , True, , i
MsgBox "Password is " & i
Exit Sub
line1: i = i + 1
Resume line2
Application.ScreenUpdating = True
End Sub