Change to loacal table

psamu

Active Member
Joined
Jan 3, 2007
Messages
462
I am trying to link all excel file in the folder through macro including excel each tab. Once linked I would like to change as access local table. I found below code, it works only it does not change to local table. Thank you for the help.

Link to Excel Spreadsheets from Access
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
What you want is possible in one step, but would require a lot of code to find the file, open Excel, go to each tab, grab the data and run a make table query or process ADO or DAO based code to make the table. There would be no linking required.

I suggest you link, since you have the code, then run make table queries on each one, then delete the linked table. How complex this would be might also depend on whether or not your final tables must have the exact same name as the linked ones. You cannot make a table with the same name as the existing linked, so a temporary name or variation of it would be necessary. Temporary names would complicate the process - you would have to rename the temp back to the name of the linked once the linked was deleted.

Perhaps you will decide it's not worth the effort. I presume you have a very good reason for making the table local instead of just leaving it linked? You realize that if the source data changes, the local table is static and will not reflect any changes made in the source file?
 
Upvote 0

Forum statistics

Threads
1,221,829
Messages
6,162,229
Members
451,756
Latest member
tommyw

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