Hi there,
I have used this code (found elsewhere on this site) to automatically update a workbook, when it is opened, to all of the linked protected spreadsheets.
Sub UpDateLinks()
Const PWord As String = " "
Dim xlLinks
Dim i As Integer
xlLinks = ThisWorkbook.LinkSources(xlExcelLinks)
If Not IsEmpty(xlLinks) Then
For i = 1 To UBound(xlLinks)
SendKeys PWord & "{Enter}"
ThisWorkbook.UpdateLink Name:=xlLinks(i)
Next i
End If
End Sub
After the code has looped through all the linked files, it then starts to loop through the workbook from the active cell populating each cell with the password.
Would anybody know why this is happening,
Thanks
John
I have used this code (found elsewhere on this site) to automatically update a workbook, when it is opened, to all of the linked protected spreadsheets.
Sub UpDateLinks()
Const PWord As String = " "
Dim xlLinks
Dim i As Integer
xlLinks = ThisWorkbook.LinkSources(xlExcelLinks)
If Not IsEmpty(xlLinks) Then
For i = 1 To UBound(xlLinks)
SendKeys PWord & "{Enter}"
ThisWorkbook.UpdateLink Name:=xlLinks(i)
Next i
End If
End Sub
After the code has looped through all the linked files, it then starts to loop through the workbook from the active cell populating each cell with the password.
Would anybody know why this is happening,
Thanks
John