0% found this document useful (0 votes)
158 views3 pages

VBA Code To Unlock A Locked Excel Sheet - 4 Steps

This document provides instructions for using VBA code to unlock a locked Excel worksheet without knowing the password. The code generates random password combinations to try to unprotect the sheet. It involves opening the VBA editor for the sheet, copying and pasting the provided code-breaking macro, running the macro, and using the password it generates if successful in unprotecting the sheet. The macro loops through combinations of characters to try unlocking the sheet without needing to know the original password.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
158 views3 pages

VBA Code To Unlock A Locked Excel Sheet - 4 Steps

This document provides instructions for using VBA code to unlock a locked Excel worksheet without knowing the password. The code generates random password combinations to try to unprotect the sheet. It involves opening the VBA editor for the sheet, copying and pasting the provided code-breaking macro, running the macro, and using the password it generates if successful in unprotecting the sheet. The macro loops through combinations of characters to try unlocking the sheet without needing to know the original password.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

byDroesslerKellyLibbey

VBACodetoUnlockaLockedExcelSheet by (/member/DroesslerKellyLibbey/)
BasicMacroExamplein
syfrog(/member/syfrog/)inmicrosoft(/tag/typeid/categorytechnology/channelmicrosoft/) Excel(/id/BasicMacro
ExampleinExcel/)
Download h(/id/VBACodeToUnlockALockedExcelSheet/) 4Steps . byTinyRick
(/id/Basic (/member/TinyRick/)
Collection IMadeit! Favorite Share
CreatingYourFirstMicrosoft
ExcelMacro(/id/Creating
YourFirstMicrosoftExcel
Macro/)
(/id/Creating bygardinerhugh6
RocketPropellant
Characterization,C++Excel
Automation,BoostProperty
Treeandthe...(/id/Rocket
(/id/Rocket PropellantCategorizationC
CreatingTablesandScatter
PlotsinExcel(/id/Creating
TablesandScatterPlotsin
Excel/)
(/id/Creating bytheEXCELerators

(/file/F1PFJJ3HQ731FJ9/)

Ifyouhaveeverforgottenapasswordforoneofyourexcelworksheetsyou
knowhowfrustratingthatcanbe.

ThecodeusedinthisinstructionisoneofthesimplestI'vefound.Itwillgenerate
ausablecodethatwillunlockyourprotectedsheet.

Ican'ttakecreditforthecodeasImerelyfounditinamomentofneed(andI
cannotfindwherethesiteisanymore)...soooIwontbemuchhelpifitdoesn't
workforyoubutI'vehadsuccesswithitandthoughtI'dshare.

Step1:OpenVBA

(/file/FSU6YHVHQ731FJA/)

Opentheworksheetyouforgetyourpasswordto.

UseAlt+F11toenterthemacroeditor.
OnceinVBAdoubleclickthesheetyouneedtounlockfromthemenulistingon
VBACodetoUnlockaLockedExcelSheet
theleft. by
syfrog(/member/syfrog/)inmicrosoft(/tag/typeid/categorytechnology/channelmicrosoft/)
Thiswillopenthegeneraldeclarationspageforthesheet.
Download h(/id/VBACodeToUnlockALockedExcelSheet/) 4Steps .
advertisement

Collection IMadeit! Favorite Share

Step2:CutandPastetheCodeBreaker

(/file/FUXPDFSHQAWYGWO/)

Insertthecodebelowinthegeneraldeclarationspageyouhaveopened.

Youshouldnothavetochangeanything,sheetnameetc...Justcutandpaste.
_______________________

SubPasswordBreaker()

'Breaksworksheetpasswordprotection.

DimiAsInteger,jAsInteger,kAsInteger
DimlAsInteger,mAsInteger,nAsInteger
Dimi1AsInteger,i2AsInteger,i3AsInteger
Dimi4AsInteger,i5AsInteger,i6AsInteger
OnErrorResumeNext
Fori=65To66:Forj=65To66:Fork=65To66
Forl=65To66:Form=65To66:Fori1=65To66
Fori2=65To66:Fori3=65To66:Fori4=65To66
Fori5=65To66:Fori6=65To66:Forn=32To126
ActiveSheet.UnprotectChr(i)&Chr(j)&Chr(k)&_
Chr(l)&Chr(m)&Chr(i1)&Chr(i2)&Chr(i3)&_
Chr(i4)&Chr(i5)&Chr(i6)&Chr(n)
IfActiveSheet.ProtectContents=FalseThen
MsgBox"Oneusablepasswordis"&Chr(i)&Chr(j)&_
Chr(k)&Chr(l)&Chr(m)&Chr(i1)&Chr(i2)&_
Chr(i3)&Chr(i4)&Chr(i5)&Chr(i6)&Chr(n)
ExitSub
EndIf
Next:Next:Next:Next:Next:Next
Next:Next:Next:Next:Next:Next
EndSub
VBACodetoUnlockaLockedExcelSheet
________________________ by
syfrog(/member/syfrog/)inmicrosoft(/tag/typeid/categorytechnology/channelmicrosoft/)

Step3:RuntheMacro
Download h(/id/VBACodeToUnlockALockedExcelSheet/) 4Steps .

Collection IMadeit! Favorite Share

(/file/FVSQXREHQAWYGWR/)

OncethecodeisaddedruntheMacrobyselectingRunfromthemenutabbar
atthetopoftheVBAeditorscreenorsimplepressF5

Step4:UsetheGeneratedCode

(/file/FIGJXGNHQAWYGWM/)

You might also like