Importing From Excel...

C

Chris Gorham

Hi,

Thanks to Nicos Yannacopou for solving my export to Excel question...

I'm currently importing a sheet from Excel into Access 2000 using
Docmd.TransferSpreadsheet.

This works fine but requires the path of the file in question to be stated
as one of the parameters.

I would like the user to be able to navigate to the file using the standard
open file dialog box. I don't want Access to bring up the wizard for
importing s/sheets since I test for field headings and data formats anyway.

Any help appreciated...Rgds Chris
 
C

Chris Gorham

Ken

thanks for this...
I'm getting an error message saying that ahtAddFilterItem is not a defined
sub or function...suggestions...

Thks...Chris
 
K

Ken Snell [MVP]

You need to use all the code that is in that example..... you'll see a long
code segment below the example that you must also include in your module!
--

Ken Snell
<MS ACCESS MVP>
 
B

BLTibbs

I am using access 2003 and cannot get this code to work. For expample. the
dim OFN as tagOPENFILENAME keeps erroring out. Where can I find code that
will open a dialog box and import an excel file for access 2003 vba?
 
K

Ken Snell \(MVP\)

Post the code that you're using. From the error that you're getting, my
guess is that you didn't include the full code from the example, as the code
has a Type block at the very top that identifies the tagOPENFILENAME object.
--

Ken Snell
<MS ACCESS MVP>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top