以下是引用wxhnr在2007-3-26 14:11:36的发言:还没遇到过解不开的工程代码. Option Explicit Dim Q Private Sub Workbook_BeforeClose(Cancel As Boolean) Application.EnableCancelKey = xlDisabled If Q = 1 Then Exit Sub Sheets("宏表1").Range("b1") = 1 If Me.Saved = False Then Me.Save End Sub Private Sub Workbook_Open() Application.EnableCancelKey = xlDisabled Sheets("宏表1").Range("b1") = 2 Application.VBE.CommandBars.FindControl(ID:=752).Execute Dim P P = InputBox("请输入口令" & Chr(10) & Chr(10) & "你只有一次机会。", "文科生恳请您破解本文件") If P <> "B79DF5578@BH468%NUYR56112F004O0" Then MsgBox "口令不正确,文件将关闭。", 16 Q = 1 Sheets("宏表1").Range("b1") = 1 ThisWorkbook.Save ThisWorkbook.Close End If End Sub
楼上 wxhnr 大哥,可以告诉我是怎么破解他的密码吗? 我把你的程序放在宏里面再打开文件生文件,没有效果呢,请赐教!
|