Problem Creating a Macro to Import Data

RianOMurchadha

New Member
Joined
Jul 11, 2019
Messages
1
Hi All,

I'm new here but figured some of you might be able to assist: I have been working with a excel file that has a large amount of macros written into it. In short, it takes 2 separate files that I receive everyday (csv and xls) and creates relationships between the two to make a pivot table.

Recently the format of these files has changed so I am trying to create a new workbook that can process this info. Whenever I try to create a macros that imports either the csv or xls files the macros automatically imports the exact files that I choose when recording the macros - I need to know how I can select a new file each time I run the macros (In the original file this is done through an activeX button).

Any help is much appreciated - I'm by no means experienced in coding but have messed around a little so can do some basic rewriting or amending.

Thanks
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off

Forum statistics

Threads
1,223,888
Messages
6,175,217
Members
452,619
Latest member
Shiv1198

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