code to work out from 2 workbooks

Patriot2879

Well-known Member
Joined
Feb 1, 2018
Messages
1,227
Office Version
  1. 2010
Platform
  1. Windows
Hi i hope you can help, i have 2 workbooks (Book13 and Book14) these both have the same data, for example in cell C12 is the number 13 in both workbooks, but if someone reduces this number to 11 in either of the workbooks i want the other workbook to automatically update the cell to 11, i dont want to mirrow the workbook as i want them both live. please can you help with the code?
 
Strange, it worked for me. Do you get any errors? Delete this line:

Code:
[COLOR=#333333]wb.close[/COLOR]

this will keep the workbook that was closed open. It will let you check 1) if it opens at all 2) It sends the changes over
 
Upvote 0

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Hi i removed the wb.close it now works great thanks.
Is there anyway to stop the closed book opening?
 
Last edited:
Upvote 0
No. You can't write to it without it opening.

You can hide it but that causes issues.

It's strange however that not closing it has fixed it which means that the save didn't work. Like I said it works for me
 
Upvote 0
i got it to work now thank you, for some reason the save bit didnt work so i added some code at the bottom to save the range selected this has worked :)

thanks for your help, can i also share the sheet and have more than one person have it open? will it still update?
 
Upvote 0
If the workbook being auto updated is being closed every time then yes it COULD work but the open workbook with more than one user can only have one that is allowed to edit (and save).
 
Upvote 0

Forum statistics

Threads
1,214,641
Messages
6,120,695
Members
448,979
Latest member
DET4492

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