LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 54
Default Run-time error 1004: Method 'UpdateLink'

When running this code in excel I am getting the following error:

Run-time error '1004':
Method 'UpdateLink' of object '_Workbook' failed

What's wrong? Here is the code I'm using:

Sub UpdateSelectedLinks()
Dim aLinks
Dim cLink As String
Dim i As Integer
Application.ScreenUpdating = False
aLinks = ActiveWorkbook.LinkSources(xlExcelLinks)
If Not IsEmpty(aLinks) Then
For i = 1 To UBound(aLinks)
cLink = Split(aLinks(i), "\")(UBound(Split(aLinks(i), "\")))
If cLink < "MasterList.xls" Then
ActiveWorkbook.UpdateLink Name:=aLinks(i), Type:=xlExcelLinks
End If
Next i
End If
Application.ScreenUpdating = True
End Sub

When I choose to debug the row that's hightlighted is "
ActiveWorkbook.UpdateLink Name:=aLinks(i), Type:=xlExcelLinks"

HELP!!!

Thanks!

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Run time Error '1004: Method 'Cells' of object'_Global' failed Ajay_N[_2_] Excel Programming 0 August 12th 06 04:57 AM
Run-time error '1004'; Method 'Export' of object'_Chart' failed Father Guido[_5_] Excel Programming 3 November 25th 05 02:30 PM
UpdateLink giving error 1004 DRK Excel Programming 5 September 15th 05 09:29 PM
ASP & EXCEL2003 - RUN-TIME ERROR 1004 in Export method Mau[_3_] Excel Programming 0 September 12th 05 09:23 AM
Run Time error '1004' when running Calculation method Simon P[_2_] Excel Programming 1 January 5th 04 12:32 PM


All times are GMT +1. The time now is 10:28 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"