我尝试编写一个类似于我用来破解 Excel 表密码的代码的vba密码破解器代码,但我不确定我是否做得正确 - 当我尝试此代码时,它提示我输入密码,但文本中没有输入密码输入框。
请提出我做错了什么。
谢谢
Sub testmacro()
Dim password
Dim a, b, c, d, e, f, g, h, i, j, k, l
SendKeys "^r"
SendKeys "{PGUP}"
For a = 65 To 66
For b = 65 To 66
For c = 65 To 66
For d = 65 To 66
For e = 65 To 66
For f = 65 To 66
For g = 65 To 66
For h = 65 To 66
For i = 65 To 66
For j = 0 To 255
password = Chr(a) & Chr(b) & Chr(c) & Chr(d) & Chr(e) & Chr(f) & Chr(g) & Chr(h) & Chr(i) & Chr(j)
SendKeys "{Enter}", True
MsgBox password
SendKeys password, True
SendKeys "{Enter}", True
On Error GoTo 200
MsgBox password
GoTo 300
200 password = ""
Next
Next
Next
Next
Next
Next
Next
Next
Next
Next
300 MsgBox "exited"
End Sub