473,385 Members | 1,898 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Excel VBA - Checking externally linked files

First off I apologize if this is in the wrong place - there isn't a section for Excel and I figured that Excel/Access VBA are similar enough for me to get away with it. Someone please move it if they think there's a more appropriate place for it.

To the problem.
A friend has asked me if I know of a way to keep external links unbroken - even if the linked workbook is moved or renamed. I don't think there's an easy way.
It's not possible for him to put all the worksheets into one workbook (I haven't seen the setup, I'm taking his word for it).

I thought that maybe he could put a hidden sheet in each linked file with a specific code in - something that would uniquely identify that book - and have a code in the main workbook to run on start-up that could check for broken links and if there are any, search for the unique codes in all excel files then auto-update the links when it's found.

Does that sound feasible, or does anyone else have a solution?
I was so adamant on Googling it that I forgot to eat my dinner (I'm at work)

If it does sound feasible, does anyone have any pointers on where I can start with the code? I've found plenty of looking for text in cells, but nothing about looking for text in specific places (or hidden sheets) in external files.

Thanks
Feb 22 '10 #1

✓ answered by NeoPa

2 things :
  1. Local drives can also be referred to using UNC. It's unusual, but perfectly feasible.
  2. Such relinking is often caused by emailing the master document to someone.
Designing such documents has always been done since the availability has been there. It was never a great idea except in some very limited circumstances. Very powerful, mind you. Just always prone to serious and difficult to solve problems when anything changed. Later versions provide better support for relinking, but nevertheless still pretty hard to get right. All-in-all, something to avoid if possible. Just my opinion, but from a little experience with that issue.

5 3520
NeoPa
32,556 Expert Mod 16PB
This is fine for this forum Manda.

I have trouble understanding what you're looking for though. If a link is broken then what can be done automatically other than report it?

Keeping links intact seems to me more about designing the links to work using UNCs instead of drive letters to me. Looking in Excel files across your system, or even worse your network, seems quite unreasonable to me. A horrendous amount of work to process through. Even for a computer this could easily take inordinate amounts of time.
Feb 23 '10 #2
Thanks NeoPa, that's what I thought too.

My first thought when he asked me about this was - if the workbooks are that important, why would they be moved or have their names changed?

I have no idea what these sheets are for, or what they contain, I just thought I'd ask, see if I was overlooking something obvious.
Thinking about it I don't even know if they're on a network share or not - though I guess they must be if multiple people use them.

I think he wants it to be able to auto-relink because the people using it aren't computer literate - maybe they'd link the wrong files, don't know how to relink etc.

Never mind, I'll let him know he'll just have to tell the others not to go changing things they don't understand.

Thanks
Feb 23 '10 #3
NeoPa
32,556 Expert Mod 16PB
2 things :
  1. Local drives can also be referred to using UNC. It's unusual, but perfectly feasible.
  2. Such relinking is often caused by emailing the master document to someone.
Designing such documents has always been done since the availability has been there. It was never a great idea except in some very limited circumstances. Very powerful, mind you. Just always prone to serious and difficult to solve problems when anything changed. Later versions provide better support for relinking, but nevertheless still pretty hard to get right. All-in-all, something to avoid if possible. Just my opinion, but from a little experience with that issue.
Feb 23 '10 #4
Thanks again NeoPa.

I'm more comfortable with Access to be completely honest. Though I'm quite happy with excel formulas, I try to avoid excel vba & macros where I can.
Feb 23 '10 #5
NeoPa
32,556 Expert Mod 16PB
A pleasure Manda.

As far as Excel VBA is concerned, I found that much easier to get to grips with originally than Access VBA, as Excel has a Record Macro facility that converts what you do as an operator into VBA commands. It's not the best code you'll ever see, but it certainly gets you going and helps you to find your way around the place. If ever you decide you want to get into it, remember to use this approach to start with. A much easier learning curve ;)
Feb 23 '10 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Marc | last post by:
Hi all, I have a problem with managing the interchange between COM/Excel and Python if the user closes the workbook externally. Everything works fine as long as the user only uses the exit...
0
by: Ciruliz ciruliz | last post by:
Hi! Sample - In Ms Access there is DB field type OLE object. I can insert excel file in field. When I click on this field, excel file is opened & no additional temp files created - excel has made...
0
by: Chris Powell | last post by:
I am using Excel/Access 2000 and have two large Excel files (25,000 rows each) that I wish to create linked tables in Access rather than importing into Access. The two source Excel files change...
1
by: John E | last post by:
I have an Access 2000 database in which there are remotely linked SQL tables and a couple of local tables. If I have queries in Access that are designed to pass data between these remote linked...
9
by: Edward S | last post by:
I budget for a Project in an Excel sheet as illustrated below. The months below are usually a 2 year period i.e. 24 months, though it could be over 24 months depending upon a Project. I then...
4
by: Mark C | last post by:
I currently have an Excel spreadsheet with numerous text boxes and check boxes that I want to populate with data from an Access 97 database. I have used Excel automation in Access before but only...
3
by: Jennyfer Barco | last post by:
Hello, I have a question, how can I open Microsoft Excel from .NET. I only need to open a new file in Excel and paste some information and set the Microsoft Excel as the enabled aplication, so the...
0
by: Grip | last post by:
Hi, I have gone throught the group and Microsoft's online help and have seen many suggestions but I am still seeking clarity: 1. I have an excel spreadsheet. Column A contains text that may...
1
by: psuaudi | last post by:
I’m using a vb.net app that opens a powerpoint presentation and calls the updatelinks function of powerpoint. One slide in the presentation is linked to a cell range in an excel file, and the...
12
by: slinky | last post by:
Can an Excel spreadsheet or a section of one be embedded into an Access form and serve as a subform from which other parts of the Access form can get data? Thanks!
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.