Update links function

G

Guest

Hello, I hope some ace can help me out. I am using VBA in Excel XP with Win 2000

I have a program that loops through more than a couple hundred Excel files, opening each one, performing certain actions, and then closing them again

I need a function that I can call that will attempt to update links in each file after opening. The catch is that some files may have many links while others may not have any links at all. Also, certain files may contain both links that can be updated and some that cannot.

The function must attempt to update links, if any, update the good ones, skip any errors, and allow the program to continue without warnings or errors under any scenario encountered.

Your example function is what I need. Please help if you know how. Thanks much in advance for your assistance.
 
T

Tom Ogilvy

On Error Resume Next
ActiveWorkbook.UpdateLink Name:=ActiveWorkbook.LinkSourcesOn Error goto
0would be something to try. -- Regards,Tom Ogilvy"quartz"
Hello, I hope some ace can help me out. I am using VBA in Excel XP with Win 2000.

I have a program that loops through more than a couple hundred Excel
files, opening each one, performing certain actions, and then closing them
again.
I need a function that I can call that will attempt to update links in
each file after opening. The catch is that some files may have many links
while others may not have any links at all. Also, certain files may contain
both links that can be updated and some that cannot.
The function must attempt to update links, if any, update the good ones,
skip any errors, and allow the program to continue without warnings or
errors under any scenario encountered.
Your example function is what I need. Please help if you know how. Thanks
much in advance for your assistance.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top