Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.links
external usenet poster
 
Posts: 37
Default Updating links to add-ins

Whenever a workbook is copied from one drive to another, Excel changes the
links path for the various add-ins being used. Bill Manville kindly provided
some code to help with updating these links when this happens (8/27/2009).

Part of the code is this....

With ActiveWorkbook
.ChangeLink stSourceName, Workbooks(stFileName).FullName
End With

When I manually run the routine that contains this statement, everything
works fine.

However, it doesn't work when this same routine is included in the
Worksheet_Open event processing that I run. During that process, the
..ChangeLink statement runs, and appears to update the link. Other UDF's are
then run, and I'm guessing it's because it is those that utilize the linked
file. Then the code returns to .Changelink line and attempts to update the
link again. It's at this time that a type mismatch error is returned, and
iappers to be impossible to trap this error.


Any idea of why this works differently in these two situations?

Thx.
  #2   Report Post  
Posted to microsoft.public.excel.links
external usenet poster
 
Posts: 473
Default Updating links to add-ins

It probably decides that a recalculation is in order after it has
changed a link; that will recalc the UDFs in appropriate circumstances.

I would suggest getting Workbook_Open to call the link-changing
procedure after the other workbook open actions have completed

Workbook_Open does
Application.OnTime Now, "LinkChanger"
and
Sub LinkChanger() in a normal module does what Workbook_Open used to
do.

Bill Manville
MVP - Microsoft Excel, Oxford, England
No email replies please - respond to newsgroup

  #3   Report Post  
Posted to microsoft.public.excel.links
external usenet poster
 
Posts: 37
Default Updating links to add-ins

Thank you, that seems to have done the trick!!

"Bill Manville" wrote:

It probably decides that a recalculation is in order after it has
changed a link; that will recalc the UDFs in appropriate circumstances.

I would suggest getting Workbook_Open to call the link-changing
procedure after the other workbook open actions have completed

Workbook_Open does
Application.OnTime Now, "LinkChanger"
and
Sub LinkChanger() in a normal module does what Workbook_Open used to
do.

Bill Manville
MVP - Microsoft Excel, Oxford, England
No email replies please - respond to newsgroup

.

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
why are my links not updating silent_tiger Excel Discussion (Misc queries) 0 February 15th 09 09:57 PM
Updating Links Varne Excel Discussion (Misc queries) 0 August 20th 08 01:23 PM
Updating links BMA Excel Discussion (Misc queries) 2 July 6th 07 12:46 PM
Updating links Brisbane Rob Excel Discussion (Misc queries) 2 April 1st 06 09:54 PM
Updating links Mike Links and Linking in Excel 1 August 17th 05 01:04 PM


All times are GMT +1. The time now is 11:06 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"