title: how do i open ALL the excel files one by one and run a macro
body: <p>I need to write a macro in VBA that will open every file in a given directory one by one and run a macro on them.</p>
  
  <p>so far i have something like </p>
  
  <pre><code>for i = 1 to number_of_files
      open Dir("C:\yourPath\*.*", vbNormal)
      call some_macro
      close file
  next i
  </code></pre>