Sunteți pe pagina 1din 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/)

S-ar putea să vă placă și