VBA button to import into data model

blueice2627

New Member
Joined
May 21, 2018
Messages
10
Hi All, I have a scenario where i want to automate as much of a sheet as possible in order to idiot proof how data is inserted into a sheet. For my company, we are able to extract data on a daily basis to show where we are currently sitting. The twist that i want to add is every day we would be importing a new data set, but, we would need to keep the old data sets as well in order to track changes.

I played with a sheet that had a functionality that i liked, but it was locked down so i'm unable to reverse engineer it. Essentially what i would want to have happen is this:

Take cell (A1 for example) and put today's date
Create a button called insert and have it coded to start the importing process:
First open explorer to select file, once file is selected, have it import into a table, on this table it will have a reference column ("Snap Date") that reflects the date that the data is for.
This table must then be combined with the main table that is a collection of all the different data sets from past dates.

Surprisingly i couldn't find anything on google that is similar to what i'm trying to do. I can record a macro through the steps of opening the import screen, but once you select a file, it doesn't do anything past that point.

Any help would be appreciated!
Thanks!
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Hi blueice,
please do post the code that you did manage to record/write, as it helps massively in helping you, thanks (do so in CODE brackets).
Cheers,
Koen
 
Upvote 0
Are you using Power Pivot? The data model can be used with or without PP.
 
Upvote 0

Forum statistics

Threads
1,223,885
Messages
6,175,187
Members
452,616
Latest member
intern444

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