VBA code to import excel table in Access

Hi! For my Access database, I am looking for a VBA code that would:
- Open a windows dialog box and let the user select an excel file
- create an empty table called "Import"
- copy the content of the columns of the excel file into the column of the access "Import" table.
Blank cells do not need to be imported, only the filled ones.
Thanks!
Jean-Christophe GALLANDKorea R&D DirectorAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
Rey Obrero (Capricorn1)Connect With a Mentor Commented:
try this sample db
selectExcel.mdb
0
 
Jean-Christophe GALLANDKorea R&D DirectorAuthor Commented:
Sorry, to make it clear, the Access table must be a duplicate of the excel table ie have the same number of columns with the same data in the cells.
0
 
Jean-Christophe GALLANDKorea R&D DirectorAuthor Commented:
Looks Great! The only thing is when I import your form in my own database, it opens in full page and not like a popup window (as it does in your sample db). How can it make it look the same?
Thanks
0
Easily Design & Build Your Next Website

Squarespace’s all-in-one platform gives you everything you need to express yourself creatively online, whether it is with a domain, website, or online store. Get started with your free trial today, and when ready, take 10% off your first purchase with offer code 'EXPERTS'.

 
Rey Obrero (Capricorn1)Commented:
set the popup property to  yes
0
 
Jean-Christophe GALLANDKorea R&D DirectorAuthor Commented:
Great, as always...
0
 
gfrancoCommented:
Your code works, fine, but what is the reason when we are importing to a DB, the table has first line blank.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.