VBA button to import into data model

blueice2627

New Member
Joined
May 21, 2018
Messages
8
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!
 

Rijnsent

Well-known Member
Joined
Oct 17, 2005
Messages
1,112
Office Version
365
Platform
Windows
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
 

Worf

Well-known Member
Joined
Oct 30, 2011
Messages
3,756
Are you using Power Pivot? The data model can be used with or without PP.
 

Forum statistics

Threads
1,077,977
Messages
5,337,506
Members
399,153
Latest member
Tsmith25

Some videos you may like

This Week's Hot Topics

Top