View Single Post
  #3  
Old June 2nd, 2008, 10:55 PM posted to microsoft.public.access
Klatuu
external usenet poster
 
Posts: 7,074
Default Access 2007 - DoCmd.RunCommand acCmdImport

Not for Excel.
Use the TransferSpreadsheet method.
Docmd.TransferSpreadsheet.

See VBA Help for details on how to use it.
--
Dave Hargis, Microsoft Access MVP


"Rui" wrote:

could it be: "DoCmd.TransferText acCmdImport" the command you are looking for?

Rui

"deko" wrote:

in Access 2003, I used "DoCmd.RunCommand acCmdImport" as part of a routine
to make importing data from Excel spreadsheets easier. After upgrading to
Access 2007 it no longer works.

Error Number 2002: You tried to perform an operation involving a function or
feature that was not installed in this version of Microsoft Access.

is there an equivalent way to programmatically open the "Get External Data"
dialog in 2007?

Thanks in advance.