Couple of possibilities
the wb variable could have lost its focus. Try replacing the line with
one of the links to be updated may be locked by user activities. If you keep getting this error it may be worth it to change your VBA code to loop through all existing links and update them individually. The advantage would be that you get to see which link is causing a problem. Is it always the same one, or a different one every time. What were you doing at the time of the error etc.![]()
Thisworkbook.UpdateLink Name:=Thisworkbook.LinkSources
Bookmarks