P
PBcorn
The below gives error 9: subscript out of range (when error handling is not
used). I thought it might be to do with workbooks(path), but not sure. It is
located in the ThisWorkbook object.
Private Sub workbook_open()
'sub to force intermediate xlwb to update its links without opening it
'Dim msg As String
On Error GoTo ms
with Workbooks("G:\filepath\filepath\file.xls")
..UpdateLink Name:=.LinkSources
end with
Exit Sub
ms:
msg = "links may have not updated properly" & vbNewLine
msg = msg & "open relevant file"
MsgBox msg
End Sub
used). I thought it might be to do with workbooks(path), but not sure. It is
located in the ThisWorkbook object.
Private Sub workbook_open()
'sub to force intermediate xlwb to update its links without opening it
'Dim msg As String
On Error GoTo ms
with Workbooks("G:\filepath\filepath\file.xls")
..UpdateLink Name:=.LinkSources
end with
Exit Sub
ms:
msg = "links may have not updated properly" & vbNewLine
msg = msg & "open relevant file"
MsgBox msg
End Sub