ouestque
asked on
Excel: Push data to closed Workbook
What ADO VBA code do I need so that when a user updates Workbook1 (Open) it will instantly update the same cell in workbook2 (Closed) WITHOUT opening workbook 2.
In the past I thought I saw some ADO code for doing this but could not get it to work and would like explore this as well as other alternatives and get your feedback on best method.
In the past I thought I saw some ADO code for doing this but could not get it to work and would like explore this as well as other alternatives and get your feedback on best method.
Please try to use Power Query to merge your data, no need VBA code.
After setting it up, you can just click refresh to update the data.
After setting it up, you can just click refresh to update the data.
If you need VBA code, you design your code :
1.Open workbook2 in background, and assign your data to one array; then close it.
2.Comparing the data btw workbook1 & workbook2 to find the different with key field,
3.If Key1 with new value in workbook2, and update Key1 in workbook1
Please upload sample workbook1/2, so we can write the code for you.
1.Open workbook2 in background, and assign your data to one array; then close it.
2.Comparing the data btw workbook1 & workbook2 to find the different with key field,
3.If Key1 with new value in workbook2, and update Key1 in workbook1
Please upload sample workbook1/2, so we can write the code for you.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
as suggested by Benjamin Lu, I would use Power Query AKA Get and Transform instead of any other solution.
ASKER
Thank you everyone!
First of all, I assume you have refered to the article below?
Reference: https://www.encodedna.com/excel/copy-data-from-closed-excel-workbook-without-opening.htm
Then again, is it really necessary to go through all the extra pain of creating a Subroutine to link cells when you can this:
Instead of Sheet1A1, you will just need to click on the reference cell you want to call in the other workbook.