Password

sree_31

Board Regular
Joined
Apr 18, 2002
Messages
63
One of my friend keeps forgetting password
after protecting a workbook

I want to write a VBA which will find the password for that workbook.

Can someone help me out.
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
Try this dear :D
This is a code that use to protect worksheets ,you can change it if you want to.

Private Sub Worksheet_Change(ByVal Target As Range)
'
' Macro by Gareth Lombard
'
Application.EnableEvents = False

ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True, Password:="????????"
Application.EnableEvents = True
End Sub

This code gos on the module:

Sub myUnLock()
'This code will unprotect the sheet.
Application.EnableEvents = False
Application.DisplayAlerts = False
ActiveSheet.Unprotect ("???????")

'Add optional code here!

Application.EnableEvents = True
Application.DisplayAlerts = True

End Sub

:eek:


_________________
If you can help a friend in need,you are a friend indeed
SO~ if you can help you do so.

Ò¿Ó⌐
This message was edited by gareth on 2002-04-25 04:20
 
Upvote 0
I don't know of any "code" to get the workbook password ( I have some that will strip the passwords from read-only files & protected sheets ), but there is an application available ( for a fee ) from :

http://www.elcomsoft.com/avpr.html

Which lets you "see" the password for XL97. For newer versions of XL it only lets you change the password.
 
Upvote 0
Can u give the code for stripping the
sheet/read only file password

I dont want any application which will remove or show password. Instead i want a code which will remove or show me the password
This message was edited by sree_31 on 2002-04-25 05:17
 
Upvote 0
If this doesn't appear correctly on the message board then feel free to drop me a note directly.

Sub sheet_BreakIt()

Dim i As Integer, j As Integer, k As Integer, l As Integer, m As Integer, n As Integer
Dim i1 As Integer, i2 As Integer, i3 As Integer, 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
Exit Sub
End If
Next n
Next i6
Next i5
Next i4
Next i3
Next i2
Next i1
Next m
Next l
Next k
Next j
Next i
End Sub

Sub workbook_breakIt()

Dim i As Integer, j As Integer, k As Integer, l As Integer, m As Integer, n As Integer
Dim i1 As Integer, i2 As Integer, i3 As Integer, 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
Workbook.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
Exit Sub
End If
Next n
Next i6
Next i5
Next i4
Next i3
Next i2
Next i1
Next m
Next l
Next k
Next j
Next i
End Sub
 
Upvote 0
Hi

some ideas.

protect without password? ok not so good but many office staff wont have a clue to reverse ths.

the 65 and 66 code doed work it takes advantage of excels usless protection and attacks the passwork field and so gives up its secrets. does work i have tested it, its been kicking about for 18 months, who really wrote it i dont know,

put the code in the module in VBA.. or should i say VB editora nd run..

WARNING can take ages *weeks* even.....
 
Upvote 0

Forum statistics

Threads
1,213,497
Messages
6,113,998
Members
448,541
Latest member
iparraguirre89

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top