title: Excel VBA - Run Macro / Open another file / Run that files macro / Save & Close
body: <p>This is what I'm trying to do.</p>
  
  <ul>
  <li>Run macro in file x</li>
  <li>File x macro opens file y</li>
  <li>Then calls file y's macro</li>
  <li>File y's macro runs</li>
  <li>File y closes</li>
  </ul>
  
  <p>Currently, I'm getting as far as opening file y from file x's macro, but the macro ends once file y is open and doesn't step through past opening.</p>
  
  <p>I had a look and attempted using info from this thread <a href="https://stackoverflow.com/questions/10708395/run-excel-macro-on-multiple-files">Run excel macro on multiple files</a>, but it didn't help.</p>
  
  <p>Appreciate any help anyone can offer.</p>
  
  <p>Here is the part of my code it gets to before ending. This opens file y, but ends the macro;</p>
  
  <pre><code>Workbooks.Open (MyPath &amp; FileY &amp; ".xls")
  </code></pre>
  
  <p>I want the macro to then do this;</p>
  
  <pre><code>ActiveWorkbook.Application.Run FileYsMacro
  </code></pre>
  
  <p>Thanks.</p>