E
Eric
Does anyone have any suggestions on why macro cannot refresh all link?
On file.xls, there are import external links on many worksheets, which will
automatically update all links once it is opened, but when I use a macro to
open this worksheets, the worksheet does not update the import external links
at all. Even though, the code .RefreshAll is included, this macro will close
this file, but the links do not update, does anyone have any suggestions why
RefreshAll coding does not perform?
Thanks in advance for any suggestions
Eric
Public Sub UpdatingLists2()
Dim WkbkName As String
Dim wkbk As Workbook
On Error Resume Next
WkbkName = "D:\Documents\file.xls"
Set wkbk = Nothing
On Error Resume Next
Set wkbk = Workbooks.Open(Filename:=WkbkName, UpdateLinks:=3)
On Error GoTo 0
With wkbk
.RefreshAll
.Close savechanges:=True
End With
On file.xls, there are import external links on many worksheets, which will
automatically update all links once it is opened, but when I use a macro to
open this worksheets, the worksheet does not update the import external links
at all. Even though, the code .RefreshAll is included, this macro will close
this file, but the links do not update, does anyone have any suggestions why
RefreshAll coding does not perform?
Thanks in advance for any suggestions
Eric
Public Sub UpdatingLists2()
Dim WkbkName As String
Dim wkbk As Workbook
On Error Resume Next
WkbkName = "D:\Documents\file.xls"
Set wkbk = Nothing
On Error Resume Next
Set wkbk = Workbooks.Open(Filename:=WkbkName, UpdateLinks:=3)
On Error GoTo 0
With wkbk
.RefreshAll
.Close savechanges:=True
End With