Advertisement
EnggarHakim

Pasword EXCEL Eraser

Jun 11th, 2014
245
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 1.00 KB | None | 0 0
  1. Sub InternalPasswords()
  2.  
  3. Dim i As Integer, j As Integer, k As Integer
  4. Dim l As Integer, m As Integer, n As Integer
  5. Dim i1 As Integer, i2 As Integer, i3 As Integer
  6. Dim i4 As Integer, i5 As Integer, i6 As Integer
  7.  
  8. On Error Resume Next
  9.  
  10. For i = 65 To 66: For j = 65 To 66: For k = 65 To 66
  11. For l = 65 To 66: For m = 65 To 66: For i1 = 65 To 66
  12. For i2 = 65 To 66: For i3 = 65 To 66: For i4 = 65 To 66
  13. For i5 = 65 To 66: For i6 = 65 To 66: For n = 32 To 126
  14.  
  15. ActiveWorkbook.Unprotect Chr(i) & Chr(j) & Chr(k) & _
  16. Chr(l) & Chr(m) & Chr(i1) & Chr(i2) & Chr(i3) _
  17. & Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)
  18.  
  19. ActiveSheet.Unprotect Chr(i) & Chr(j) & Chr(k) & _
  20. Chr(l) & Chr(m) & Chr(i1) & Chr(i2) & Chr(i3) _
  21. & Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)
  22.  
  23. If ActiveWorkbook.ProtectStructure = False Then
  24.  
  25. If ActiveWorkbook.ProtectWindows = False Then
  26.  
  27. If ActiveSheet.ProtectContents = False Then
  28.  
  29. Exit Sub
  30. End If
  31. End If
  32. End If
  33.  
  34. Next: Next: Next: Next: Next: Next
  35. Next: Next: Next: Next: Next: Next
  36.  
  37. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement