0% found this document useful (0 votes)
133 views

The Office Experts Sample VBA - Crack Excel Worksheet Password

This document provides a VBA code to crack the password on a protected Excel worksheet. The code uses nested For loops to iterate through all possible 6 character password combinations of numbers and letters to uncover the password and unprotect the sheet. Pasting the code into a module and running the PasswordBreaker macro will attempt all possible passwords to remove the worksheet's protection.

Uploaded by

lbnuke
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)
133 views

The Office Experts Sample VBA - Crack Excel Worksheet Password

This document provides a VBA code to crack the password on a protected Excel worksheet. The code uses nested For loops to iterate through all possible 6 character password combinations of numbers and letters to uncover the password and unprotect the sheet. Pasting the code into a module and running the PasswordBreaker macro will attempt all possible passwords to remove the worksheet's protection.

Uploaded by

lbnuke
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/ 2

11/26/13

The Office Experts Sample VBA - Crack Excel Worksheet Password

Back to Samples Menu VBA Samples

Microsoft Excel

Crack Sheet Protection Password


This routine provides a password to unprotect your worksheet. However, it may not give you the original password that was used. Open the workbook that has the protected sheet in it. Hit Alt+F11 to view the Visual Basic Editor. Hit Insert-Module and paste this code into the right-hand code window: S u bP a s s w o r d B r e a k e r ( ) ' A u t h o ru n k n o w nb u ts u b m i t t e db yb r e t t d jo fw w w . e x p e r t s e x c h a n g e . c o m D i miA sI n t e g e r ,jA sI n t e g e r ,kA sI n t e g e r D i mlA sI n t e g e r ,mA sI n t e g e r ,nA sI n t e g e r D i mi 1A sI n t e g e r ,i 2A sI n t e g e r ,i 3A sI n t e g e r D i mi 4A sI n t e g e r ,i 5A sI n t e g e r ,i 6A sI n t e g e r O nE r r o rR e s u m eN e x t F o ri=6 5T o6 6 :F o rj=6 5T o6 6 :F o rk=6 5T o6 6 F o rl=6 5T o6 6 :F o rm=6 5T o6 6 :F o ri 1=6 5T o6 6 F o ri 2=6 5T o6 6 :F o ri 3=6 5T o6 6 :F o ri 4=6 5T o6 6 F o ri 5=6 5T o6 6 :F o ri 6=6 5T o6 6 :F o rn=3 2T o1 2 6 A c t i v e S h e e t . U n p r o t e c tC h r ( i )&C h r ( j )&C h r ( k )&_ C h r ( l )&C h r ( m )&C h r ( i 1 )&C h r ( i 2 )&C h r ( i 3 )&_ C h r ( i 4 )&C h r ( i 5 )&C h r ( i 6 )&C h r ( n ) I fA c t i v e S h e e t . P r o t e c t C o n t e n t s=F a l s eT h e n M s g B o x" O n eu s a b l ep a s s w o r di s"&C h r ( i )&C h r ( j )&_ C h r ( k )&C h r ( l )&C h r ( m )&C h r ( i 1 )&C h r ( i 2 )&_ C h r ( i 3 )&C h r ( i 4 )&C h r ( i 5 )&C h r ( i 6 )&C h r ( n ) A c t i v e W o r k b o o k . S h e e t s ( 1 ) . S e l e c t R a n g e ( " a 1 " ) . F o r m u l a R 1 C 1=C h r ( i )&C h r ( j )&_ C h r ( k )&C h r ( l )&C h r ( m )&C h r ( i 1 )&C h r ( i 2 )&_ C h r ( i 3 )&C h r ( i 4 )&C h r ( i 5 )&C h r ( i 6 )&C h r ( n ) E x i tS u b E n dI f N e x t :N e x t :N e x t :N e x t :N e x t :N e x t N e x t :N e x t :N e x t :N e x t :N e x t :N e x t

www.theofficeexperts.com/VBASamples/Excel02.htm

1/2

11/26/13

The Office Experts Sample VBA - Crack Excel Worksheet Password

E n dS u b Close the VB Editor window. Navigate to the worksheet you want to unprotect. Hit Tools-Macro-Macros and double-click PasswordBreaker in the list.

www.theofficeexperts.com/VBASamples/Excel02.htm

2/2

You might also like