Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 493
Default updating links with calculations in many workbooks

I have two major workbooks with calculated cells linked to many other
workbooks. Those other workbookes have calculated linked cells to these two
major workbooks.

I'm opening these two major workbooks in a system (everything is hidden for
a user):
xlapp1.AskToUpdateLinks = False ' to update links
Set xlbook1 = xlapp1.Workbooks.Open(strOurFileName, True)

With xlbook1 ' updating links again, just in case

.UpdateLink Name:=.LinkSources ' ActiveWorkbook.LinkSources '

End With

' Checking for any error:
If IsError(.Worksheets(1).Cells(i, j)) = True Then
....

The same for the other workbook.
....
Keeping them opened.

Then, I'm opening with links updating in the same way those many workbooks.
But, after opening I'm closing them.

After all linked workbookes have been opened and closed, I' updating links
again in the two major workbooks:

With xlbook1

.UpdateLink Name:=.LinkSources ' ActiveWorkbook.LinkSources '

End With

and close them:
xlapp1.ActiveWorkbook.Save
xlapp1.Quit

After that, I transfer the data from the one of the two workbooks into DB
table, but data there are not updated.

However, when I open the workbook in a regular way (without programing), I
can see that data is been updated in this workbook.

May be I should at the end in my code close the major workbook, open it
again, and close it again?

Could anybody advise anything?

Thanks



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Updating links in protected workbooks Alan P Excel Discussion (Misc queries) 1 November 3rd 09 09:15 PM
UPDATING LINKS TO OTHER WORKBOOKS :( Dan Excel Discussion (Misc queries) 5 February 22nd 09 09:58 PM
Updating Workbooks from multiple links Workbooks TimJames Excel Worksheet Functions 1 December 15th 07 03:34 PM
Updating links to closed workbooks goofy11 Excel Discussion (Misc queries) 0 March 23rd 06 04:28 PM
index & match with links for updating to other workbooks wrpalmer Excel Worksheet Functions 3 July 20th 05 03:18 PM


All times are GMT +1. The time now is 02:11 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"