If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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. |
Thread Tools | |
Display Modes | |
|
|