Newbie trying to create a macro that will import from Excel (1 Viewer)

MITSupport

Registered User.
Local time
Today, 22:41
Joined
Aug 8, 2016
Messages
46
Hi all

I am a newbie ( well sort of been a long time since i did any macros or programming ) i have a problem that i need some help with.

I am trying to create a macro that will import worksheets and place them into a table. I have been trying for a while so i thought that i will ask.

The column names in Excel are matching the Field names in Access but there are multiple worksheets in the same workbook that have different classifications on them.

And to top it all off the kicker is that there a multiple spreadsheets with different data to add to different tables.

So basically i need help as this is doing my head in :banghead:

Thanks in Advance

MITSupport
 

Ranman256

Well-known member
Local time
Today, 08:41
Joined
Apr 9, 2015
Messages
4,337
Take the workbook, save it as a generic name like, File2Import.xls
In access, attach each worksheet as a linked table.
Once all sheets are linked, create a query to import the data for each sheet.
Put all these queries in a macro.

Now the steps will be:
1 save workbook to the same place, overwrite File2import.xls
2 run import macro
Done.
 

MITSupport

Registered User.
Local time
Today, 22:41
Joined
Aug 8, 2016
Messages
46
Hi Ranman
Thanks for your reply. I will give it a go this afternoon and let you know how i go.

Regards

MITSupport
 

Users who are viewing this thread

Top Bottom