title: how to copy data from mpp file to excel using macro
body: <p>I am new to macros.I want to write a macro to copy specific data in columns in MPP to another using excel.</p>
  
  <p>I have found a code that will copy data from one excel to another.please help</p>
  
  <pre><code>Option Explicit
  
  Sub CopytoPS()
      Dim sfil As String
      Dim owbk As Workbook
      Dim sPath As String
  
      sPath = "C:\Users\HYMC\Excel\Test\" 'Change the file path for your purposes
      sfil = Dir(sPath &amp; "Management Report PS.xls")
  
      Range("A2:I22").Copy
  
      Set owbk = Workbooks.Open(sPath &amp; sfil)
      owbk.Sheets("Sales Data").Range("B65536").End(xlUp).Offset(1, 0).PasteSpecial xlPasteValues
      owbk.Close True 'Save opened workbook and close
      sfil = Dir
  End Sub
  </code></pre>
  
  <p>I want to copy certain coloums in MPP to a set of cloumns in Excel.I also want user to just give the destination file path,source file ,source cells to be copied and destination cells</p>