VBA to append MS access table with contents of anothe Excel sheet.

Richard U

Active Member
Joined
Feb 14, 2006
Messages
406
Office Version
  1. 365
  2. 2016
  3. 2010
  4. 2007
Platform
  1. Windows
THE SITUATION:

Each month, we get a new excel spreadsheet that we are manually loading into an access database, and appending it, column for column into an existing table.


I am looking for some VBA code that would allow a user to select an Excel spreadsheet, then append the contents of that spreadsheet to an existing table in MS access.

Is there a way to do this?
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
you dont need vb.
save the spread sheet to your PC AND to the same generic name: c:\temp\Data2Import.xls

in the Access table, link the xl file as a table.
make an append query to add the data from the xl table to the main table.
put this in a macro.

then the steps are:
1.save new workbook to c:\temp\Data2Import.xls
2. run macro.
done

you could even make an xl macro to do the save temp.
 
Upvote 0
This has to be VBA without any links. This is a spreadsheet coming from an outside source.

We only have 1 Access license, so once this is set up, it needs to be a stand alone from that end. The business reasons are beyond my control, but these are the limitations that have been imposed on me.

1) No links
2) No queries in the access database.

So it has to be VBA
 
Upvote 0

Forum statistics

Threads
1,215,045
Messages
6,122,830
Members
449,096
Latest member
Erald

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