Solved

VBA code to import excel table in Access

Posted on 2008-06-22
6
6,046 Views
Last Modified: 2013-11-27
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!
0
Comment
Question by:gallandjc
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 

Author Comment

by:gallandjc
ID: 21841858
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
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 500 total points
ID: 21841886
try this sample db
selectExcel.mdb
0
 

Author Comment

by:gallandjc
ID: 21841988
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
MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 21842036
set the popup property to  yes
0
 

Author Closing Comment

by:gallandjc
ID: 31469581
Great, as always...
0
 

Expert Comment

by:gfranco
ID: 37887958
Your code works, fine, but what is the reason when we are importing to a DB, the table has first line blank.
0

Featured Post

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

729 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question