Hey,
I am pasting a lot of data from excel to powerpoint, here is a code fragment:
This will be called once for every slide.
The problem is when you paste the data, if u pause your program you can see that an instance of Graph9.exe is running in the Task Manager. Or in this case, there is an instance for every slide, about 20 instances, and they all take up a remarkable amount of system resources.
I figured the,
would free the memory, but it does not. When execution is complete, the instances terminate. But while the code is running this makes my old computer at home crash.
Any help would be great.
-Greg
I am pasting a lot of data from excel to powerpoint, here is a code fragment:
Code:
Sub adjustData()
'
' This sub changes the chart data to the relevant excel informaiton
'
Dim oGraph As Object
Dim oPPTShape As PowerPoint.Shape
Dim j As Integer
On Error GoTo xxx
Set oPPTShape = ActivePresentation.Slides(i + 1).Shapes(yq + 2)
If oPPTShape.Type = msoEmbeddedOLEObject Then
If oPPTShape.OLEFormat.ProgID = "MSGraph.Chart.8" Then
Set oGraph = oPPTShape.OLEFormat.Object
oGraph.Application.dataSheet.Range("00").Paste False 'true
End If
End If
Set oGraph = Nothing
set oPPTShape = Nothing
Exit Sub
xxx: Debug.Print "there was an error"
End Sub
This will be called once for every slide.
The problem is when you paste the data, if u pause your program you can see that an instance of Graph9.exe is running in the Task Manager. Or in this case, there is an instance for every slide, about 20 instances, and they all take up a remarkable amount of system resources.
I figured the,
Code:
Set oGraph = Nothing
Set oPPTShape = Nothing
would free the memory, but it does not. When execution is complete, the instances terminate. But while the code is running this makes my old computer at home crash.
Any help would be great.
-Greg