Macro to update documents

CHSLax60

New Member
Joined
Jun 6, 2011
Messages
15
Here is my scenario.
I have different workbooks in different places on a server (we'll call them DocA & DocB) that have a cell that links to a cell in a master workbook (we'll call it Doc1). The value of that cell in Doc1 changes values in tables in DocA & DocB. And there are cells in Doc1 that link to those tables in DocA & DocB.

What I want to do is be able to change the value in that cell in Doc1 and have a macro button that would open DocA & DocB to update their tables so the data can be pulled back into Doc1.

If I could force the DocA & DocB to close automatically that would be an added bonus.
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
sub saveit()
Workbooks.Open Filename:= _
"c:\DocA.xls"
Workbooks.Open Filename:= _
"c:\DocB.xls"
Workbooks("DocA.xls").Sheets("Sheet1").activate
ActiveWorkbook.Save
ActiveWindow.Close
Workbooks("DocB.xls").Sheets("Sheet1").activate
ActiveWorkbook.Save
ActiveWindow.Close
end sub
 
Upvote 0

Forum statistics

Threads
1,224,524
Messages
6,179,308
Members
452,904
Latest member
CodeMasterX

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