Está en la página 1de 1

Option Explicit

Sub DesbloquearHoja()
Dim Contrasenia As String
Dim a As Integer, b As Integer, c
Dim d As Integer, e As Integer, f
Dim a1 As Integer, a2 As Integer,
Dim a4 As Integer, a5 As Integer,
On Error Resume Next

As
As
a3
a6

Integer
Integer
As Integer
As Integer

For a = 65 To 66: For b = 65 To 66: For c = 65 To 66


For d = 65 To 66: For e = 65 To 66: For a1 = 65 To 66
For a2 = 65 To 66: For a3 = 65 To 66: For a4 = 65 To 66
For a5 = 65 To 66: For a6 = 65 To 66: For f = 32 To 126
Contrasenia = Chr(a) & Chr(b) & Chr(c) & Chr(d) & Chr(e) & Chr(a1) _
& Chr(a2) & Chr(a3) & Chr(a4) & Chr(a5) & Chr(a6) & Chr(f)
ActiveSheet.Unprotect Contrasenia
If ActiveSheet.ProtectContents = False Then
MsgBox "Lo he logrado!" & vbCr & _
"La Contrasea es:" & vbCr & Contrasenia
Exit Sub
End If
Next: Next: Next: Next: Next: Next
Next: Next: Next: Next: Next: Next
End Sub