Which line generates the Error?

"Alex" wrote:

> I'm updating links in Excel workbook from MS Access app.
> It was working well and I didn't do any changes.
> But, now I'm getting an error during the debugging:
> "Error number 1004: Application-defined or object defined error."
> Before that, I've got some error that links cannot be updated in
> ..._Workbook (but no this error message during the debugging).
>
> Dim xlapp1 As New Excel.Application
> Dim xlbook1 As New Excel.Workbook
>
> xlapp1.DisplayAlerts = False
> xlapp1.AskToUpdateLinks = False
>
> Set xlbook1 = xlapp1.Workbooks.Open(strOurFileName, True)
>
> With xlbook1
> .UpdateLink Name:=.LinkSources ' Here is the error
> End With
>
> xlapp1.ActiveWorkbook.Save
> xlapp1.Quit
>
> Could anybody clarify how I could fix it?
>
> Thanks