Link update problem

A

Alex

When I'm trying to do the following thing to update link
for a linked Excel table to get updated data:

Dim xlapp As New Excel.Application
Dim xlbook As New Excel.Workbook


DoCmd.SetWarnings False
xlapp.DisplayAlerts = False

Set xlbook = xlapp.Workbooks.Open("Table.xls")

ActiveWorkbook.UpdateLink ' error

or

xlbook.UpdateLink ' error

It generates an error.

May be it's enough to open a table without the next
UpdateLink. Or may be it's better to set up something for
default links update before table opening.
Could anybody advise anything?

Thanks
 
Top