[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Linked sheets not found when opening a workbook

Posted on 2011-03-01
7
Medium Priority
?
207 Views
Last Modified: 2012-05-11
When I open a workbook that has links to sheets in another workbook - fine.
However when the workbook being linked to (source) isn't present I get a dialog prompting to edit the links.

Does this come from a workbook event?  Can I trap and provide my own behaviour? If yes then how?

The real situation:  
I have a set of sheets that have the year as part of the name.  Each year there will be a copy put into archive and the year part of the name changed.  eg. SourceA_2010.xls becomes SourceA_2011.xls and so on.
I have the code required to change the links, I have just had the idea it would be nice to run that if required automatically - not having to cancel the default behaviour then run a custom macro.
0
Comment
Question by:AndyAinscow
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
7 Comments
 
LVL 85

Accepted Solution

by:
Rory Archibald earned 2000 total points
ID: 35006908
There isn't an event for that and the prompt occurs prior to any code (including Workbook_Open) running if you have automatic link updating enabled.
0
 
LVL 45

Author Comment

by:AndyAinscow
ID: 35006931
Thanks.
I'll leave it open for a couple of days just in case someone knows different.

(I might explore using an app to copy/paste/rename and then automate excel to modify the paths - but that is something unrelated to this question)
0
 
LVL 85

Expert Comment

by:Rory Archibald
ID: 35006953
You would have to turn off automatic updating of external links, then have your code run in the Open event, check the path for each link and then prompt to update if required.
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 45

Author Comment

by:AndyAinscow
ID: 35007053
Not an option :-(
That would affect all other workbooks.


Actually I write too quickly.
If I left the autocheck ON, cancel the dialog then at workbook open I could run my own code to test and fixup the links.
Hmmm, got to think a little about that.
0
 
LVL 3

Expert Comment

by:AL_XResearch
ID: 35009948
HI AndyAinscow,

If I have understood correctly you are repeatadly being asked about external links when a workbook opens which you don't want. I assume you have updated / corrected all the cell links in your workbook. You might try checking the 'Named cell ranges' to see if any refer to an external workbook.

Theses are defined in menu option [Insert - Names - Define ...]. Some of these names may point to ranges in other sheets - in which case you can correct or delete them
0
 
LVL 45

Author Comment

by:AndyAinscow
ID: 35010244
>>If I have understood correctly you are repeatadly being asked about external links when a workbook opens which you don't want.

No.  Links are fine, they are required.  This is a one off behaviour because the links are being deliberately broken.

I'm having a rethink based on comments by rorya.  The following is the critical bit of my original question.

When I open a workbook that has links to sheets in another workbook - fine.
However when the workbook being linked to (source) isn't present I get a dialog prompting to edit the links.

Does this come from a workbook event?  Can I trap and provide my own behaviour? If yes then how?


0
 
LVL 45

Author Closing Comment

by:AndyAinscow
ID: 35017642
Actually Workbook_Open is fired before this dialog (at least on my PC and excel version).  I check if a link is broken and then remake the links.  However now comes the dialog prompting for the edit links, with the OLD paths.  Cancel this dialog, save and close, open again and no dialog because the links are OK.
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question