Guitarde,
I do hope I am wrong, but I don't think you can update dependent links in a closed workbook. If you can then I have never seen a way to do this??? I have tried to figure out a way to do this in the past and have not been able. As far as I can tell, the UpdateLink method updates precedents only...
Anyway, Randal, if you have not yet found a solution, here is a procedure and an accompanying function which will update your workbooks without much interference. As a practice, I avoid placing constants used in code in a range and, therefore, this procedure will use workbook names to find your files which need to be updated. Without editing the code it'self, the only criteria is that each name will need to begin with "Dependent". For example, you have 9 files, as of now, which you would like to update. From the Worksheet Menu Bar, in your Source workbook, choose Insert, Name, Define. Type in the name of your first definition, "Dependent01". In the "refers to" textbox at the bottom, type in the full pathname of this file. Hit enter or click on Add. Do this for each of your 9 workbooks. You should have now defined 9 workbook names with each name referring to a correct path. Save you Source file! Now you're ready to go. Place this code in a standard module and run the public procedure "OpenUpdateSave" as you wish. Assign it to a button or call it from the Click_Event of some control you have drawn out on your worksheet. If all goes well, the procedure will simply run and end. If not, you will get a messagebox telling you what the problem is. There is one additional procedure which you may or may not want to utilize. ShowPrecendentNames. I don't know your users, but you may want to hide your names to protect them from being changed. I think you can only do this in code. Simply call the procedure and pass an argument of true to show or false to hide. This will keep the names invisible in the "Names" dialog and inaccessible to editing. To test rather the procedure is working or not. With the source workbook being the only open workbook, change some values which are linked to one or more of your nine workbooks. Run the procedure. Now close your source workbook. Open one or more or your dependent books and choose NOT to update links at the prompt. The linked values should reflect the changes you have made in your source workbook. The download example link at the bottom will allow you to see where the code is placed and what the names and paths look like. Obviously, this will not work without you changing the pathnames. To copy the code to your clipboard, click the link at the bottom of this page.
<font color="#202020" size="3" face="Courier New"><pre>
<font face="Courier New" size="2" color="#0000A0">Option Explicit</font>
<hr size=1 style="verticalAlign=top;">
<font face="Courier New" size="2" color="#0000A0">Public</font> <font face="Courier New" size="2" color="#0000A0">Sub</font> OpenUpdateSave()
<font face="Courier New" size="2" color="#0000A0">On</font> <font face="Courier New" size="2" color="#0000A0">Error</font> <font face="Courier New" size="2" color="#0000A0">GoTo</font> err_OpenUpdateSave
<font face="Courier New" size="2" color="#0000A0">Dim</font> <font color="#505050">objName</font>
<font face="Courier New" size="2" color="#0000A0">As</font> <font face="Courier New" size="2" color="#0000A0">Name</font>, <font color="#505050">strMsg</font>
<font face="Courier New" size="2" color="#0000A0">As String</font>
Application.ScreenUpdating =
<font face="Courier New" size="2" color="#0000A0">False</font>
<font face="Courier New" size="2" color="#0000A0">For</font> <font face="Courier New" size="2" color="#0000A0">Each</font> <font color="#505050">objName</font>
<font face="Courier New" size="2" color="#0000A0">In</font> ActiveWorkbook.Names
<font face="Courier New" size="2" color="#0000A0">If</font> <font face="Courier New" size="2" color="#f00000">Left</font>(<font color="#505050">objName</font>.Name, 9) = "Dependent"
<font face="Courier New" size="2" color="#0000A0">Then</font>
<font color="#505050">strMsg</font> = <font color="#505050">strMsg</font> & UpdateDependent(Evaluate(<font color="#505050">objName</font>.RefersTo))
<font face="Courier New" size="2" color="#0000A0">End If</font>
<font face="Courier New" size="2" color="#0000A0">Next</font>
<font face="Courier New" size="2" color="#0000A0">If</font> <font face="Courier New" size="2" color="#f00000">Len</font>(<font color="#505050">strMsg</font>) <> 0
<font face="Courier New" size="2" color="#0000A0">Then</font>
<font face="Courier New" size="2" color="#0000A0">MsgBox</font> <font color="#505050">strMsg</font>
<font face="Courier New" size="2" color="#0000A0">End If</font>
Application.ScreenUpdating =
<font face="Courier New" size="2" color="#0000A0">True</font>
<font face="Courier New" size="2" color="#0000A0">Set</font> <font color="#505050">objName</font> =
<font face="Courier New" size="2" color="#0000A0">Nothing</font>
<font face="Courier New" size="2" color="#0000A0">Exit</font> <font face="Courier New" size="2" color="#0000A0">Sub</font>
err_OpenUpdateSave:
<font face="Courier New" size="2" color="#0000A0">MsgBox</font> "OpenUpdateSave" &
<font face="Courier New" size="2" color="#f00000">Chr</font>(13) & Err.Number & " - " & Err.Description
<font face="Courier New" size="2" color="#0000A0">Set</font> <font color="#505050">objName</font> =
<font face="Courier New" size="2" color="#0000A0">Nothing</font>
<font face="Courier New" size="2" color="#0000A0">End</font> <font face="Courier New" size="2" color="#0000A0">Sub</font>
<hr size=1 style="verticalAlign=top;">
<font face="Courier New" size="2" color="#0000A0">Private</font> <font face="Courier New" size="2" color="#0000A0">Function</font> UpdateDependent(strDependent
<font face="Courier New" size="2" color="#0000A0">As String</font>)
<font face="Courier New" size="2" color="#0000A0">As String</font>
<font face="Courier New" size="2" color="#0000A0">On</font> <font face="Courier New" size="2" color="#0000A0">Error</font> <font face="Courier New" size="2" color="#0000A0">GoTo</font> err_UpdateDependent
<font face="Courier New" size="2" color="#0000A0">Dim</font> <font color="#505050">objFSO</font>
<font face="Courier New" size="2" color="#0000A0">As</font> <font face="Courier New" size="2" color="#0000A0">New</font> FileSystemObject, <font color="#505050">objWB</font>
<font face="Courier New" size="2" color="#0000A0">As</font> Excel.Workbook
<font face="Courier New" size="2" color="#0000A0">Dim</font> <font color="#505050">strOpenBookName</font>
<font face="Courier New" size="2" color="#0000A0">As String</font>
<font face="Courier New" size="2" color="#0000A0">If</font> <font face="Courier New" size="2" color="#0000A0">Not</font> <font color="#505050">objFSO</font>.FileExists(strDependent)
<font face="Courier New" size="2" color="#0000A0">Then</font>
UpdateDependent = "Path does not exist: " & strDependent &
<font face="Courier New" size="2" color="#f00000">Chr</font>(13)
<font face="Courier New" size="2" color="#0000A0">Exit</font> <font face="Courier New" size="2" color="#0000A0">Function</font>
<font face="Courier New" size="2" color="#0000A0">End If</font>
<font face="Courier New" size="2" color="#0000A0">Set</font> <font color="#505050">objFSO</font> =
<font face="Courier New" size="2" color="#0000A0">Nothing</font>
<font color="#505050">strOpenBookName</font> =
<font face="Courier New" size="2" color="#f00000">Mid</font>(strDependent, InStrRev(strDependent, "\") + 1)
<font face="Courier New" size="2" color="#0000A0">On</font> <font face="Courier New" size="2" color="#0000A0">Error</font> <font face="Courier New" size="2" color="#0000A0">Resume</font> <font face="Courier New" size="2" color="#0000A0">Next</font>
<font face="Courier New" size="2" color="#0000A0">Set</font> <font color="#505050">objWB</font> = Application.Workbooks(<font color="#505050">strOpenBookName</font>)
<font face="Courier New" size="2" color="#0000A0">If</font> Err.Number <> 0
<font face="Courier New" size="2" color="#0000A0">Then</font>
<font face="Courier New" size="2" color="#0000A0">Set</font> <font color="#505050">objWB</font> = Application.Workbooks.Open(strDependent,
<font face="Courier New" size="2" color="#0000A0">True</font>)
<font face="Courier New" size="2" color="#0000A0">End If</font>
<font face="Courier New" size="2" color="#0000A0">On</font> <font face="Courier New" size="2" color="#0000A0">Error</font> <font face="Courier New" size="2" color="#0000A0">GoTo</font> err_UpdateDependent
<font color="#505050">objWB</font>.Close
<font face="Courier New" size="2" color="#0000A0">True</font>
<font face="Courier New" size="2" color="#0000A0">Set</font> <font color="#505050">objWB</font> =
<font face="Courier New" size="2" color="#0000A0">Nothing</font>
<font face="Courier New" size="2" color="#0000A0">Exit</font> <font face="Courier New" size="2" color="#0000A0">Function</font>
err_UpdateDependent:
UpdateDependent = Err.Number & " - " & Err.desription & _
" pertaining to" &
<font face="Courier New" size="2" color="#f00000">Chr</font>(13) & " -" & strDependent
<font face="Courier New" size="2" color="#0000A0">End</font> <font face="Courier New" size="2" color="#0000A0">Function</font>
<hr size=1 style="verticalAlign=top;">
<font face="Courier New" size="2" color="#009900">'Usage from some procedure</font>
<font face="Courier New" size="2" color="#009900">'Call ShowPrecendentNames(True)</font>
<font face="Courier New" size="2" color="#009900">'Call ShowPrecendentNames(False)</font>
<font face="Courier New" size="2" color="#0000A0">Private</font> <font face="Courier New" size="2" color="#0000A0">Sub</font> ShowPrecendentNames(ShowName
<font face="Courier New" size="2" color="#0000A0">As</font> <font face="Courier New" size="2" color="#0000A0">Boolean</font>)
<font face="Courier New" size="2" color="#0000A0">Dim</font> <font color="#505050">objName</font>
<font face="Courier New" size="2" color="#0000A0">As</font> <font face="Courier New" size="2" color="#0000A0">Name</font>
<font face="Courier New" size="2" color="#0000A0">For</font> <font face="Courier New" size="2" color="#0000A0">Each</font> <font color="#505050">objName</font>
<font face="Courier New" size="2" color="#0000A0">In</font> ActiveWorkbook.Names
<font face="Courier New" size="2" color="#0000A0">If</font> <font face="Courier New" size="2" color="#f00000">Left</font>(<font color="#505050">objName</font>.Name, 9) = "Dependent"
<font face="Courier New" size="2" color="#0000A0">Then</font>
<font color="#505050">objName</font>.Visible = ShowName
<font face="Courier New" size="2" color="#0000A0">End If</font>
<font face="Courier New" size="2" color="#0000A0">Next</font>
<font face="Courier New" size="2" color="#0000A0">End</font> <font face="Courier New" size="2" color="#0000A0">Sub</font>
<hr size=1 style="verticalAlign=top;">
</pre></font>
Google Search<text> - </text>
Email TsTom<text> - </text>
Where do I put this code?<text> - </text>
Copy Code to your Clipboard<text> - </text>
Download Example
<pre> If you need further information pertaining to the above code, click on the term in question.
Many, but not all, are links to MSDN. If the downloaded file does not behave correctly in your
browser, then right click the link, choose "Save target as" and download to your hard-drive.
Tom</pre>