如果Excel文件的打开密码忘记了,且密码是6位数以内的数字,可用以下步骤解开(关掉所有程序,为了速度):
新开一Excel,同时按Alt和F11,进入VBA界面,点菜单上的插入,模块,在新出来的窗口粘贴一下代码:Sub crack()Dim i As LongDim FileName As Stringi = 0FileName = Application.GetOpenFilename("Excel文件(*.xls & *.xlsx),*.xls;*.xlsx", , "VBA破解")FileName = Right(FileName, Len(FileName) - InStrRev(FileName, ""))Application.ScreenUpdating = Falseline2: On Error GoTo line1Workbooks.Open FileName, , True, , iMsgBox "Password is " & iExit Subline1: i = i + 1Resume line2Application.ScreenUpdating = TrueEnd Sub然后在此界面直接按F5运行此宏,选择文件,等啊等(看密码长度了)