Importing excel files to access by pressing the button

amateur12

New Member
Joined
Jul 26, 2017
Messages
1
Hello all,

I have to write a vba code running by clicking on the button that will open the window where we choose the excel files (8 excel files) that we want to import. Is it possible to define in the code which columns I want to import (cause I don't need all of the data)?
I've been trying many codes but none of them was working.
Or maybe there is a better way then writing code in VBA? :confused:
To be fair it's my first task with access so I'm not familiar with it.

Greetings,
Estebian
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Welcome to the Board!

One option would be to import them into a temporary table that has all the fields. Then you can use an Append Query to write them from the Temporary Table to your Final Table, only writing the fields that you want.
 
Upvote 0

Forum statistics

Threads
1,221,683
Messages
6,161,264
Members
451,692
Latest member
jmaskin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top