M
Mr. T
Help! (please)
I have an excel app that, when I click a button, is supposed to copy a
powerpoint template to a new file and then update the linked charts in that
new file. (I used paste-special to insert the links.) The links are set to
be updated manually.
I am using the following macro in powerpoint, which works fine when I run it
from powerpoint:
Sub UpdateTheLinks()
For Each sld In ActivePresentation.Slides
For Each sh In sld.Shapes
If sh.Type = msoLinkedOLEObject Then
sh.LinkFormat.Update
End If
Next
Next
End Sub
In excel, I have a macro that runs the following code. The problem is that I
get an error stating "sub or function not defined" on the line that says
"ppApp.Run "UpdateTheLinks".
sub picture7_Click ()
Dim ppApp As PowerPoint.Application
FileCopy ActiveWorkbook.Path & "\template.ppt", "abc.ppt"
Set ppApp = New PowerPoint.Application
ppApp.Visible = True
ppApp.Presentations.Open NewFileName, msoFalse
ppApp.Visible = msoCTrue
ppApp.Run "UpdateTheLinks" ' this is where I get the error
ppApp.Quit
MsgBox "Presentation Created"
Exit Sub
picture7_ClickErr:
MsgBox "Error " & Err.Number & ": " & Err.Description
Resume Next
End Sub
I have an excel app that, when I click a button, is supposed to copy a
powerpoint template to a new file and then update the linked charts in that
new file. (I used paste-special to insert the links.) The links are set to
be updated manually.
I am using the following macro in powerpoint, which works fine when I run it
from powerpoint:
Sub UpdateTheLinks()
For Each sld In ActivePresentation.Slides
For Each sh In sld.Shapes
If sh.Type = msoLinkedOLEObject Then
sh.LinkFormat.Update
End If
Next
Next
End Sub
In excel, I have a macro that runs the following code. The problem is that I
get an error stating "sub or function not defined" on the line that says
"ppApp.Run "UpdateTheLinks".
sub picture7_Click ()
Dim ppApp As PowerPoint.Application
FileCopy ActiveWorkbook.Path & "\template.ppt", "abc.ppt"
Set ppApp = New PowerPoint.Application
ppApp.Visible = True
ppApp.Presentations.Open NewFileName, msoFalse
ppApp.Visible = msoCTrue
ppApp.Run "UpdateTheLinks" ' this is where I get the error
ppApp.Quit
MsgBox "Presentation Created"
Exit Sub
picture7_ClickErr:
MsgBox "Error " & Err.Number & ": " & Err.Description
Resume Next
End Sub