Update External Links in Excel from PowerPoint

Closed
Katie B - Nov 1, 2016 at 10:23 AM
I have been trying to attempt this for several weeks and would really appreciate some help.

I need to write a marco in a PowerPoint presentation that will update the external links in an Excel document called "ViewableGelSchedulev3.xlsx". From my understanding, the Excel document has to be opened in order to update the links. so i tried writing code to open it and then update the links but I am getting error message 424 that an object is required at the "ActiveWorkbook.UpdateLink Name:=ActiveWorkbook.LinkSources" line. The code is below. Please help!

Public Sub basicrefresh()

Dim xlApp As Object
Dim xlWorkBook As Object

Set xlApp = CreateObject("Excel.Application")

xlApp.Visible = True
Set xlWorkBook = xlApp.Workbooks.Open("H:\DeptShare\EW CAPS PERFORM\EW CAPS OUTLOOK\EW CAPS OUTLOOK\Scheduling\ViewableGelSchedulev3.xlsx", UpdateLinks)
xlApp.Workbooks("ViewableGelSchedulev3.xlsx").Activate
ActiveWorkbook.UpdateLink Name:=ActiveWorkbook.LinkSources

Set xlApp = Nothing
Set xlWorkBook = Nothing



End Sub