title: Bypass password on an Excel VBA project *.xla
body: <p>Due to a change in procedure I need to update the code in an excel macro. The person that designed it has left the firm two years ago. While trying to revive it, I found out the macro project is password protected.
  I have been searching for a workaround for about two hours, my best bet was an older discussion on this board:
  <a href="https://stackoverflow.com/questions/1026483/is-there-a-way-to-crack-the-password-on-an-excel-vba-project">Is there a way to crack the password on an Excel VBA Project?</a></p>
  
  <p>Every single person that quotes an example uses this format:</p>
  
  <pre><code>CMG="..."
  DPB="..."
  GC="..."
  </code></pre>
  
  <p>Now here's my problem. When I load the file (it's .xla) in a hex editor, I see that the DPB-string is cut in two, not equal parts. Between the two parts I have a massive amount of other code and the classic jibberish. So if I want to replace the original string with the strings from my other easy password protected dummy macro, I have no idea what part of the string to put before, and what part after.</p>
  
  <p>Here's what it looks like:</p>
  
  <pre><code>VersionCompatible32="393222000"
  CMG="B9BB1563196319671D671D"
  DPB="3C3E906990F1ADF1AD0E53F2ADA57F5232827697A774ECD098BDyNone&lt;bh:9f&gt;y&lt;bh:10&gt;&lt;bh:00&gt;
  </code></pre>
  
  <p>[then comes a massive amount of irrelevant data] (notice the 'DyNone', no idea if that 'D' is part of the string, or part of 'DyNone')</p>
  
  <pre><code>&lt;bh:00&gt;uf_GetSQL&lt;bh:03&gt;&lt;bh:00&gt;&lt;bh:00&gt;&lt;bh:02&gt;&lt;bh:09&gt;&lt;bh:00&gt;&lt;bh:00&gt;&lt;bh:00&gt;uf_VarSQL&lt;bh:05&gt;&lt;bh:00&gt;&lt;bh:00&gt;&lt;bh:02&gt;86B8588665A975BB5916D296"
  GC="BFBD13EA15EE99EF99EF99"
  
  [Host Extender Info]
  &amp;H00000001={3832D640-CF90-11CF-8E43-00A0C911005A};VBE;&amp;H00000000
  </code></pre>
  
  <p>Both parts are about halfway the file, but still a considerable large distance from eachother.</p>
  
  <p>I've tried moving the second part after the first like this:</p>
  
  <pre><code>VersionCompatible32="393222000"
  CMG="B9BB1563196319671D671D"
  DPB="3C3E906990F1ADF1AD0E53F2ADA57F5232827697A774ECD098B86B8588665A975BB5916D296"
  GC="BFBD13EA15EE99EF99EF99"
  
  DyNone&lt;bh:9f&gt;
  </code></pre>
  
  <p>But then I get an 'unreadable content' error and the project is gone. Also, the above mentioned topic mentions a solution when your replacement string is shorter than the original. In my situation  the cmg-string is 2 longer and the dpb-string one longer instead of shorter... So that's a second problem.</p>
  
  <p>I realize I'm basically asking to help me 'crack' a file. I'll understand if questions like these are not allowed. In that case I know my new fall project.</p>