Instructions for setting and breaking passwords in Excel
- 24-07-2022
- thuypham
- 0 Comments
With the nature of the work of some people requiring high security, setting a password for the data file is essential, as is in Excel. The following article will guide you in detail on how to set a password for an Excel file in the simplest way on the basis of Microsoft Excel 2013.
Mục lục
1.Open Excel files that need to be secured
2. Go to the file, select Info then Encrypt with Password in Protect Workbook
3. Encrypt Document dialog box appears
Please enter the password you want
And confirm the password again
4. Check for success
Please close the sheet window you are using and reopen, at this time the Password window appears and you must enter the password to log in.
So, after successfully setting the password, maybe you don't remember the password you set, what to do?
Just like other applications, we also need some supporting software. However, there is still a way for you to break the password for a set sheet without any other support
- 1. Open locked Excel file
- 2. Open the visual basic Editor by pressing Alt+F11 with excel: 2003,2007,2010. With excel 2013 and above, select Developer on the toolbar and then select visual basic Editor
- 3. Select the sheet to unlock
- 4. Copy the code in
Sub PasswordBreaker()
If ActiveSheet.ProtectContents = False Then
MsgBox "Sheet '" & ActiveSheet.Name & "' is unprotected!", vbInformation
Else
If MsgBox("Sheet '" & ActiveSheet.Name & "' is protected, do you want to unprotect it?", _
vbYesNo + vbQuestion, "Unprotect Active Sheet") = vbNo Then Exit Sub
Dim i As Integer, j As Integer, k As Integer
Dim l As Integer, m As Integer, n As Integer
Dim i1 As Integer, i2 As Integer, i3 As Integer
Dim i4 As Integer, i5 As Integer, i6 As Integer
On Error Resume Next
For i = 65 To 66: For j = 65 To 66: For k = 65 To 66
For l = 65 To 66: For m = 65 To 66: For i1 = 65 To 66
For i2 = 65 To 66: For i3 = 65 To 66: For i4 = 65 To 66
For i5 = 65 To 66: For i6 = 65 To 66: For n = 32 To 126
ActiveSheet.Unprotect Chr(i) & Chr(j) & Chr(k) & _
Chr(l) & Chr(m) & Chr(i1) & Chr(i2) & Chr(i3) & _
Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)
Next: Next: Next: Next: Next: Next
Next: Next: Next: Next: Next: Next
If ActiveSheet.ProtectContents = False Then MsgBox "Sheet '" & ActiveSheet.Name & "' is unprotected!", vbInformation
EndIf
End Sub
- 5. Run the program with the shortcut F5
- 6. Confirm password deletion
Good luck !