Jika anda memerlukanuntuk membuka password dari file excel yang ada sebenarnya ada beberapacara.
Memberikan password file dokumen Excel ini sebetulnya mudah. Cuma karena memang tidak ada tombol atau shortcut nya di menu jadi tidak banyak juga orang yang tahu caranya. Berikut penulis coba share panduan sederhana cara memberikan password file dokumen Excel. Adapun panduan ini penulis buat menggunakan Microsoft Office 2007.
Disini saya berikan cara paling mudah dan cepat yang saya temukanuntuk melakukannya.
1. Buka file Excel yang telah diprotect atau dikunci
2. Kemudian Buka VBA dengan cara : Klik kanan sheet, view codeatau tekan ALT + F11
3. Kemudian Copy-kan kode HTML di bawah inimulai dari Public Sub All.......s/d and sub :
' Breaks worksheet and workbookstructure passwords. Bob McCormick
' probably originator ofbase code algorithm modified for coverage
' of workbook structure /windows passwords and for multiple passwords
' Norman Harker and JE McGimpsey27-Dec-2002 (Version 1.1)
' Modified 2003-Apr-04 by JEM:All msgs to constants, and
' Reveals hashed passwords NOToriginal passwords
Const AUTHORS As String =DBLSPACE & vbNewLine & _
'Norman Harker and JE McGimpsey'
Const HEADER As String ='AllInternalPasswords User Message'
Const VERSION As String =DBLSPACE & 'Version 1.1.1 2003-Apr-04'
Const REPBACK As String =DBLSPACE & 'Please report failure ' & _
'to the microsoft.public.excel.programming newsgroup.'
Const ALLCLEAR As String =DBLSPACE & 'The workbook should ' & _
'now be free of all password protection, so make sure you:'& _
DBLSPACE & 'SAVE IT NOW!' & DBLSPACE &'and also' & _
DBLSPACE & 'Also, remember that the password was '& _
'put there for a reason. Don't stuff up crucial formulas '& _
'or data.' & DBLSPACE & 'Access and use ofsome data ' & _
Const MSGNOPWORDS1 As String ='There were no passwords on ' & _
'sheets, or workbook structure or windows.' & AUTHORS& VERSION
Const MSGNOPWORDS2 As String ='There was no protection to ' & _
'Proceeding to unprotect sheets.' & AUTHORS &VERSION
Const MSGTAKETIME As String ='After pressing OK button this ' & _
'will take some time.' & DBLSPACE &'Amount of time ' & _
![Buka Buka](http://1.bp.blogspot.com/-IEEGrCCoODA/Utf4h3qCkdI/AAAAAAAAA0A/zvWJFVYdDrM/s1600/exel.jpg)
'depends on how many different passwords, the ' & _
'passwords, and your computer's specification.' &DBLSPACE & _
'Just be patient! Make me a coffee!' & AUTHORS& VERSION
Const MSGPWORDFOUND1 As String ='You had a Worksheet ' & _
'Structure or Windows Password set.' & DBLSPACE& _
'The password found was: ' & DBLSPACE &'$$' & DBLSPACE & _
'Note it down for potential future use in other workbooks by '& _
'the same person who set this password.' & DBLSPACE& _
'Now to check and clear other passwords.' & AUTHORS& VERSION
Const MSGPWORDFOUND2 As String ='You had a Worksheet ' & _
'password set.' & DBLSPACE & 'The passwordfound was: ' & _
DBLSPACE & '$$' & DBLSPACE & 'Noteit down for potential ' & _
'future use in other workbooks by same person who ' & _
'set this password.' & DBLSPACE & 'Now tocheck and clear ' & _
Const MSGONLYONE As String ='Only structure / windows ' & _
'protected with the password that was just found.' & _
Dim w1 As Worksheet, w2 AsWorksheet
Dim i As Integer, j As Integer, kAs Integer, l As Integer
Dim m As Integer, n As Integer,i1 As Integer, i2 As Integer
Dim i3 As Integer, i4 As Integer,i5 As Integer, i6 As Integer
Dim ShTag As Boolean, WinTag AsBoolean
Application.ScreenUpdating =False
WinTag = .ProtectStructureOr .ProtectWindows
ShTag = False
ShTag= ShTag Or w1.ProtectContents
If Not ShTag And Not WinTag Then
Exit Sub
MsgBox MSGTAKETIME,vbInformation, HEADER
MsgBoxMSGNOPWORDS2, vbInformation, HEADER
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
.UnprotectChr(i) & Chr(j) & Chr(k) & _
Chr(i3) & Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)
.ProtectWindows = False Then
Chr(m) & Chr(i1) & Chr(i2) & Chr(i3)& _
MsgBox Application.Substitute(MSGPWORDFOUND1, _
Exit Do 'Bypass all for...nexts
End With
Next: Next: Next:Next: Next: Next
On Error GoTo 0
If WinTag And Not ShTag Then
Exit Sub
End If
For Each w1 In Worksheets
w1.Unprotect PWord1
On Error GoTo 0
For Each w1 In Worksheets
'Checks for all clearShTag triggered to 1 if not.
Next w1
For Each w1 InWorksheets
If.ProtectContents Then
Do 'Dummy do loop
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
Chr(l) & Chr(m) & Chr(i1) & Chr(i2)& Chr(i3) & _
If Not .ProtectContents Then
Chr(m) & Chr(i1) & Chr(i2) &Chr(i3) & _
MsgBox Application.Substitute(MSGPWORDFOUND2, _
'leverage finding Pword by trying on other sheets
w2.Unprotect PWord1
Exit Do 'Bypass all for...nexts
Next: Next: Next: Next: Next: Next
Loop Until True
EndIf
Next w1
MsgBox ALLCLEAR & AUTHORS& VERSION & REPBACK, vbInformation, HEADER
4. Kemudian Pilih AllInternalPasswords dan klik Run
Demikian caranya step by step untuk membuka file excel yang telah diprotect.
1. Create a new .xlsm file.
2. In the VBA part, set a simple password (for instance 'macro').
3. Save the file and exit.
4. Change file extention to '.zip', open it by any archiver program.
5. Find the file: 'vbaProject.bin' (in 'xl' folder).
6. Extract it from archive.
7. Open the file you just extracted with a hex editor (for example HxD).
8. Find and copy the value from parameter DPB (value in quotation mark), example:
DPB='282A84CBA1CBA1345FCCB154E20721DE77F7D2378D0EAC90427A22021A46E9CE6F17188A'. (This value generated for 'macro' password. You can use this DPB value to skip steps 1-8)
9. Do steps 4-7 for file with unknown password (file you want to unlock).
10. Change DBP value in this file on value that you have copied in step 8.
>>If copied value is shorter than in encrypted file you should populate missing characters with 0 (zero). If value is longer - that is not a problem (paste as it is).
11. Save the 'vbaProject.bin' file and exit from hex editor.
12. Replace existing 'vbaProject.bin' file with modified one.
13. Change extention from '.zip' back to '.xlsm'
14. Now, open the excel file you need to see the VBA code in. The password for the VBA code
will simply be macro (as in the example I'm showing here).
For those who still using old file format (2003 - .xls) method has less steps:
1. Open .xls file with hex editor (for example HxD).
2. Find parameter DPB, change value for this parameter by our own. If your value is shorter than value in encrypted file, you should populate missing characters with 0 (zero). If value is longer - that is not a problem (paste as it is).
DPB='282A84CBA1CBA1345FCCB154E20721DE77F7D2378D0EAC90427A22021A46E9CE6F17188A'. (This value generated for 'macro' password).
3. Save changes.