title: Import Excel file to Access with VBA
body: <p>Good Afternoon,</p>
  
  <p>I have been working on an Access database project this year, with VBA a complete unknown to me going into this. I have the VBA code importing Excel data into a temporary table in my database and then appending to the correct table, it works but I am curious if this is the most effcient way in regards to coding and memory usage?</p>
  
  <pre><code>Function TempReview()  
  On Error GoTo TempReview_Err  
  
  DoCmd.SetWarnings False  
  DoCmd.OpenQuery "ClearTempReview", acViewNormal, acEdit  
  DoCmd.TransferSpreadsheet acImport, 10, "TempReview", "M:\filename.xlsx", True, ""  
  DoCmd.OpenQuery "AppendReview", acViewNormal, acEdit   
  
  TempReview_Exit:  
  Exit Function  
  
  TempReview_Err:  
  MsgBox Error$  
  Resume TempReview_Exit  
  
  End Function  
  </code></pre>
  
  <p>I have similar features in other areas of the database, which I also wish to improve if I can.</p>
  
  <p>Regards</p>
  
  <p>Lee</p>