Hello all,

I've attempted to rectify my problem from google or other vbforum threads w/o any luck... I'm working from Excel VBA 2010.

I need to save one of my sheets as a .dbf, and know that Access still has support for this file format. I have exported the sheet I need to save into an Access Database and simply need to export that Access table as a dBaseIV.

The following code snippet is causing the problem:

"Run Time error: 2046"
The command or action 'transferDatabase" isn't available now.

The following code snippet is causing the error.

vb Code:
  1. Dim oApp As Object
  2.         Set oApp = CreateObject("Access.Application")
  3.  
  4.         Dim acExport As Variant
  5.         Dim acReport As Variant
  6.         oApp.DoCmd.TransferDatabase acExport, "dBase IV", pathToAccessDB, acReport, "tempGIS", dbfLocation

the pathToAccessDB points to the .mdb containing the table I need to export. tempGIS is said table name. dbfLocation is the .dbf file I'm attempting to export to.

Any suggestions?

Thanks much!