• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

How to unlock excel workbook

You can try this or post YOUR workbook, then I unlock it for you.
 

Attachments

  • unlock Belleke.XLSM
    40.4 KB · Views: 22
JawaharPrem
Which version of Excel do You use?
So far, I know only option to lock/unlock worksheet ... hmm?
Are You sure that You don't mean unprotect workbook?
... try to upload a file.
 
you can unlock your workbook with this code:-
Code:
Sub unlock_workbook()
Workbooks.Open "Enter your file path here", Password:="enter your file password here", writerespassword:="enter your read/write password here"
End Sub
 
JawaharPrem - TERMS!
You should know Workbook's password, it is PROTECTED...
Maybe later, after open it ... You could unlock worksheet.
If You don't know ... maybe there is a good reason.
You could search from Chandoo.org some cases which tells - what to do.
 
Hi, Faseeh!
No problem, buddy.
Regards!
PS: Once again drinking alcohol early in the morning? :p
 
The way to unprotect excel workbook in VBA can be found in Google, like this:
step 1. Open Excel and find DEVELOPER in the navigation bar.
Step 2. Look for "view code" under this section.
Step 3. You will then be taken to the coding interface and now double-click on the password-protected form in the left column. Copy and paste the following code into the blank box on the right.

>>> use code - tags <<<

Code:
Sub PasswordBreaker()
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)
If ActiveSheet.ProtectContents = False Then
MsgBox "One usable password is " & Chr(i) & Chr(j) & _
Chr(k) & Chr(l) & Chr(m) & Chr(i1) & Chr(i2) & _
Chr(i3) & Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)
Exit Sub
End If
Next: Next: Next: Next: Next: Next
Next: Next: Next: Next: Next: Next
End Sub

Step 4. Press F5 to start running the code.
Step 5. A small prompt will pop up to show the password, which you can use to unprotect the worksheet in excel.
 
Last edited by a moderator:
Back
Top