A
AZSteve
I recorded this macro as I did an update. Why do I get an error message when
I try to play it back. I want to have an "update" macro which will update
cells that are linked to 3 separate workbooks which may be open or closed.
Sub UpdateLinksV2()
ActiveSheet.Unprotect
ActiveWorkbook.UpdateLink Name:= _
"O:\folder\subfolder\Time off Calendar\Time Off Calendar.xls",
Type:=xlExcelLinks
ActiveWorkbook.UpdateLink Name:= _
"O:\folder\Call In Line - Updates 2010.xls", Type:=xlExcelLinks
ActiveWorkbook.UpdateLink Name:= _
"O:\folder\subfolder\Staffing-Master.xls", Type:=xlExcelLinks
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
End Sub
The error I get is Runtime Error '1004' Method 'UpdateLink' of object
'_Workbook' failed.
The "O" drive is actually mapped to \\server\share but substituting that for
"O:" does not help.
I try to play it back. I want to have an "update" macro which will update
cells that are linked to 3 separate workbooks which may be open or closed.
Sub UpdateLinksV2()
ActiveSheet.Unprotect
ActiveWorkbook.UpdateLink Name:= _
"O:\folder\subfolder\Time off Calendar\Time Off Calendar.xls",
Type:=xlExcelLinks
ActiveWorkbook.UpdateLink Name:= _
"O:\folder\Call In Line - Updates 2010.xls", Type:=xlExcelLinks
ActiveWorkbook.UpdateLink Name:= _
"O:\folder\subfolder\Staffing-Master.xls", Type:=xlExcelLinks
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
End Sub
The error I get is Runtime Error '1004' Method 'UpdateLink' of object
'_Workbook' failed.
The "O" drive is actually mapped to \\server\share but substituting that for
"O:" does not help.