title: Access acc.DoCmd.TransferSpreadsheet method throws error
body: <p>below is the code which i used to transfer the data from active sheet to access table '</p>
  
  <p>it throws the following error </p>
  
  <p>'  run time error 2498</p>
  
  <pre><code>Sub AccImport()
  Dim acc As New Access.Application
  Dim rng As Range
  Set rng = ActiveSheet.Range("A1").CurrentRegion
  'MsgBox (rng.Address)
  acc.OpenCurrentDatabase "C:\Users\ksathis\Desktop\sample.accdb"
  acc.DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel12Xml, "RETOUCH_WORKEDHOURS", ActiveWorkbook.FullName, True, rng
  acc.CloseCurrentDatabase
  acc.Quit
  Set acc = Nothing
  End Sub
  </code></pre>
  
  <p>this is how my access table look</p>
  
  <p><img src="https://i.stack.imgur.com/hQGxe.png" alt="enter image description here"></p>
  
  <p>and this how my excel look sheet look
  <img src="https://i.stack.imgur.com/1auaZ.png" alt="enter image description here"></p>