title: Unlock protected workbook without knowing password
body: <p>I'm stuck with a problem, I'm creating a automation to automatically fill a report with spreadsheets downloaded from a website. however these sheets comes protected with a password, I've found a code to unlock the workbook without having to provide a password, however isn't working on excel 2016, anybody knows some other way? </p>
  
  <p>Here's the code I have:</p>
  
  <pre><code>Sub UnProtect_Excel_WorkSheet()
      'Unlock Protect Excel Worksheet
      Dim i1 As Integer, i2 As Integer, i3 As Integer, j1 As Integer, j2 As Integer, j3 As Integer
      Dim k1 As Integer, k2 As Integer, k3 As Integer, l1 As Integer, l2 As Integer, l3 As Integer
      Dim a As Double
  
      On Error Resume Next
      a = 0
      'Try all Possible Alternate Combination Password
      For i1 = 65 To 66: For i2 = 65 To 66: For i3 = 65 To 66
      For j1 = 65 To 66: For j2 = 65 To 66: For j3 = 65 To 66
      For k1 = 65 To 66: For k2 = 65 To 66: For k3 = 65 To 66
      For l1 = 65 To 66: For l2 = 65 To 66: For l3 = 32 To 126
          ThisWorkbook.Sheets(1).Unprotect Chr(i1) &amp; Chr(i2) &amp; Chr(i3) &amp; Chr(j1) &amp; Chr(j2) &amp; Chr(j3) &amp; Chr(k1) &amp; Chr(k2) &amp; Chr(k3) &amp; Chr(l1) &amp; Chr(l2) &amp; Chr(l3)
          a = a + 1
          ThisWorkbook.Sheets(2).Cells(a, 1) = Chr(i1) &amp; Chr(i2) &amp; Chr(i3) &amp; Chr(j1) &amp; Chr(j2) &amp; Chr(j3) &amp; Chr(k1) &amp; Chr(k2) &amp; Chr(k3) &amp; Chr(l1) &amp; Chr(l2) &amp; Chr(l3)
  
          'Check if the Protection is Removed
          If ActiveSheet.ProtectContents = False Then
              MsgBox "One usable password is " &amp; Chr(i1) &amp; Chr(i2) &amp; Chr(i3) &amp; Chr(j1) &amp; Chr(j2) &amp; Chr(j3) &amp; Chr(k1) &amp; Chr(k2) &amp; Chr(k3) &amp; Chr(l1) &amp; Chr(l2) &amp; Chr(l3)
              Exit Sub
          End If
  
          'Exit Loop
      Next: Next: Next: Next: Next: Next
      Next: Next: Next: Next: Next: Next
  End Sub
  </code></pre>