View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 6,953
Default How to quit from Powerpoint launched trought VBA codes in Exce

Did you try running the code provided?

--
Regards,
Tom Ogilvy



"Dennis" wrote:

No, I want to close PowerPoint, when the "Presentation View" mode has
terminated. Or, when the users do click on "End Presentation".

Is there event in VBA for PowerPoint?

Regards!
Dennis.

"Tom Ogilvy" wrote:

You want to close excel.

Application.Quit

--
Regards,
Tom Ogilvy


"Dennis" wrote:

Thanks Tom, but I didn't explain the following:

I want to close the application after that has been shown in PowerPoint.

I'm sorry!

"Tom Ogilvy" wrote:

untested, but try

Sub LaunchPPT()
Dim PPSlide As Object
Set PPSlide = CreateObject("PowerPoint.application")
With PPSlide
.Visible = True
.presentations.Open filename:="C:\InfoData\Programas\InfoGraph.pps"
.Run "InfoGraph.pps!UpdateAllLinks"
.presentations("InfoGraph.pps").Saved = True
.Presentations("InfoGraph.pps").close
End With
ppslide.quit
set ppslide = nothing
End sub

--
Regards,
Tom Ogilvy

"Dennis" wrote:

Hello,

Is there any possibility to quit from application PowerPoint launched
through VBA codes in Excel?

I have the following code in Excel:

Sub LaunchPPT()
Dim PPSlide As Object
Set PPSlide = CreateObject("PowerPoint.application")
With PPSlide
.Visible = True
.presentations.Open filename:="C:\InfoData\Programas\InfoGraph.pps"
.Run "InfoGraph.pps!UpdateAllLinks"
.presentations("InfoGraph.pps").Saved = True
End With

Help me, please!