Excel-VBA: Modify Application Without Using Password. [duplicate]
I have developed an application using Excel-VBA and applied password protection to it to prevent modification. Now, I have forgotten the password and I want to update my application. Is there any way to modify the application without using the password?
My interpretation of this discussion is that it is OK to provide a link to password cracking software for worksheet passwords, but not for passwords protecting VBA code.
To unprotect worksheets, I like the code posted by Microsoft Excel MVP Nico Sterk at http://members.chello.nl/n.sterk/ExcelPages/Files/excel_files.htm The BreakPassword macro in the downloaded workbook will identify a substitute password in about a minute. It requires Excel 2000 and later. Here is how to use it: 1) Click on any cell in the worksheet that you want to unprotect 2) ALT + F8 to open the macro selector 3) Choose the PasswordBreaker macro (from Nico Sterk's workbook), then click the "Run" button
With Excel 97 and 2000, there is an amazing loophole discovered by MalicUK--just reset the password to an empty string using VBA:
Sub UnprotectActiveSheet()
Dim ws As Worksheet
Set ws = ActiveSheet
ws.Protect "", , , , True
ws.Range("A1").Copy
ws.Range("A1") End
Sub
-Anonymous
精彩评论