G
Guest
A slide in my PPT 2003 contains a linked Excel 2003 file. The Excel file contains a macro that refreshes a web query. I want to create a macro in my PPT that will execute the Excel macro, but I can't figure out how to properly reference the Excel spreadsheet. I appreciate any help!
I've boiled my code down to:
Sub testmacro()
Dim oShape As Shape
' Get a reference to the shape linked spreadsheet
Set oShape = ActiveWindow.Selection.SlideRange.Shapes("Object 6")
' Execute the macro to refresh the spreadsheet data
oShape.LinkFormat.Application.Run ("RefreshData")
End Sub
The "Run" statement causes Runtime Error -2147188160 (80048240) Application (unknown member) : Invalid Request. Sub or function not defined.
I've boiled my code down to:
Sub testmacro()
Dim oShape As Shape
' Get a reference to the shape linked spreadsheet
Set oShape = ActiveWindow.Selection.SlideRange.Shapes("Object 6")
' Execute the macro to refresh the spreadsheet data
oShape.LinkFormat.Application.Run ("RefreshData")
End Sub
The "Run" statement causes Runtime Error -2147188160 (80048240) Application (unknown member) : Invalid Request. Sub or function not defined.