PC Review


Reply
Thread Tools Rate Thread

Code to open links

 
 
=?Utf-8?B?R3JlZyBILg==?=
Guest
Posts: n/a
 
      28th Aug 2007
Is there a set of code i can enter into a document that will open all linked
documents. I don't want to just update but actually open all documents
linked to the main document. Is there a way to do this? Thanks
 
Reply With Quote
 
 
 
 
=?Utf-8?B?VG9tIE9naWx2eQ==?=
Guest
Posts: n/a
 
      28th Aug 2007
Place code like this in the Thisworkbook module of your workbook

Private Sub Workbook_Open()
Dim alinks as Variant
aLinks =ThisWorkbook.LinkSources(xlExcelLinks)
If Not IsEmpty(aLinks) Then
For i = 1 To UBound(aLinks)
on Error Resume Next
Application.workbooks.Open alinks(i)
if err.number <> 0 then _
msgbox alinks(i) & " could not be opened"
on Error goto 0
Next i
End If
Thisworkbook.Activate
End Sub


Placed in the Workbook_Open event.

--
Regards,
Tom Ogilvy


"Greg H." wrote:

> Is there a set of code i can enter into a document that will open all linked
> documents. I don't want to just update but actually open all documents
> linked to the main document. Is there a way to do this? Thanks

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why do messages with links take so long to open links in Outlook 2007 boe Microsoft Outlook Discussion 1 3rd Jun 2008 05:12 AM
links in emails don open the internet site but open local link bro =?Utf-8?B?bWFtYSBzY3JhcHB5?= Microsoft Outlook Discussion 5 1st Apr 2006 04:46 PM
Cannot open links in IE or send hyper links..have followed MS arti =?Utf-8?B?cHVycGxlIHNwaWtl?= Windows XP General 6 2nd Jan 2005 04:45 PM
How can i open links in new windows from my links bar? Tom Windows XP Internet Explorer 1 21st Jan 2004 04:13 PM
Links in Links Toolbar do not open in current window... joebagofdonuts Windows XP Internet Explorer 0 30th Nov 2003 04:54 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:17 AM.