Link to home
Start Free TrialLog in
Avatar of theomysh
theomysh

asked on

End Graph.exe process in powerpoint vba code

Hi,

I am modifying a graph with Powerpoint vba, each time I set the oGraphChart a new process of graph.exe begins, but when I clear my objects the process graph.exe remains in my task manager and each time I run my macro on another object another instance of graph.exe starts. How do I end the instance of graph.exe in my vba code?

Here is what I have tried but it does not end the process graph.exe


    Dim oGraphChart As Object
    Dim oDatasheet As Object
    Dim oSh As Shape

            Set oSh = ActiveWindow.Selection.ShapeRange(1)
            Set oGraphChart = oSh.OLEFormat.Object
            Set oDatasheet = oGraphChart.Application.datasheet
            With oDatasheet

.....

            end with

           
            Set oSh = Nothing
            Set oGraphChart = Nothing
            Set oDatasheet = Nothing
ASKER CERTIFIED SOLUTION
Avatar of irudyk
irudyk
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of theomysh
theomysh

ASKER

Thank you so much!!!!!
I just noticed that my graphs do not update when I added oGraphChart.Application.Quit

Is there an update or save step I should be doing?
Hmm, I'm not sure why that would be the case since after updating values in the datasheet object results in my graph updating automatically.  I notice that in my code after:
     Set oSh = ActiveWindow.Selection.ShapeRange(1)
I have
     oSh.Activate
Maybe that would make a difference for you?
Also, maybe enter:
     oGraphChart.Application.Update
before the line
     oGraphChart.Application.Quit