A command button to import from closed workbook

breynolds0431

Active Member
Joined
Feb 15, 2013
Messages
303
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Hello. I am attempting to create an analysis workbook with three tabs. The first would be a variance table using formulas to compute differences between the other two tabs (which would be "Old Data" and "New Data"). My question is, how would I create a command button on "Old Data" to import from a separate workbook into the "Old Data" tab, as the first tab is using formulas from "Old Data"? I would then apply the same method to the "New Data" tab, if this is a possibility.

Thank you for any ideas.
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
It seems like ADO/DOA require the import location to be predetermined. Does this work with using a open file dialogue box to select the workbook to import?

I don't see why you couldn't capture the filename before you launch into the import routine. You could use the GetOpenFileName method to do that. I can post code for it if you like.
 
Upvote 0

Forum statistics

Threads
1,223,229
Messages
6,170,881
Members
452,364
Latest member
springate

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