ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Can't Update Links (https://www.excelbanter.com/excel-programming/286528-cant-update-links.html)

No Name

Can't Update Links
 
Hi,

I've got a workbook which is 4.6MB. It has links to
different workbooks which vary from 48K to 4.0MB. I've
attempted to update the links of the workbook using update
links as follows:

=========================
varSnapbookLinks = wkbSnapTemplate.Linksource(xlExcelLinks)

If not isEmpty(varSnapbookLinks) then
for i = 1 to ubound(varSnapbookLinks)
wkbSnaptemplate.UpdateLink Name:=varSnapbookLinks(i)
next i
End if
===========================

This works with other workbooks but does not with this one:

So, I've developed a work around as follows:

============================
varSnapbookLinks = wkbSnapTemplate.Linksource(xlExcelLinks)

If not isEmpty(varSnapbookLinks) then
for i = 1 to ubound(varSnapbookLinks)
workbooks.open Filename:=varSnapbooksLinks(i),_
updateLinks:=false, ReadOnly:=True
Call Close_File(Activeworkbook) 'a simple routine
which closes the file with specific parameters.
next i
End if

==============================


This works, until I open the next file, at which time the
previously updated links revert to zero.

The links won't update manually only and the only way to
get all of the links to update is to open all the files at
once.

I suspect that the problem has to due with the files size
and the amount of memeory available.

Any ideas?

Thanks.


All times are GMT +1. The time now is 06:12 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com