+ Reply to Thread
Results 1 to 7 of 7

How to quit from Powerpoint launched trought VBA codes in Excel

  1. #1
    Dennis
    Guest

    How to quit from Powerpoint launched trought VBA codes in Excel

    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!



  2. #2
    Tom Ogilvy
    Guest

    RE: How to quit from Powerpoint launched trought VBA codes in Excel

    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!
    >
    >


  3. #3
    Dennis
    Guest

    RE: How to quit from Powerpoint launched trought VBA codes in Exce

    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!
    > >
    > >


  4. #4
    Tom Ogilvy
    Guest

    RE: How to quit from Powerpoint launched trought VBA codes in Exce

    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!
    > > >
    > > >


  5. #5
    Dennis
    Guest

    RE: How to quit from Powerpoint launched trought VBA codes in Exce

    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!
    > > > >
    > > > >


  6. #6
    Tom Ogilvy
    Guest

    RE: 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!
    > > > > >
    > > > > >


  7. #7
    Dennis
    Guest

    RE: How to quit from Powerpoint launched trought VBA codes in Exce

    Yes, but it's close and quit automatically with ".close" and ".quit" commands.

    I want that it's close the presentation (*.pps) and close the application
    (PowerPoint) when the user wishes him.

    In "InfoGraph.pps" presentations I have a code VBA for PowerPoint (..as
    macro), it's assinged to "Shape" object, and it works perfectly in "show"
    mode. The trouble is when the user pressed the key [ESC] and "show" mode is
    finished.

    Sub CloseAndQuit()
    With Application
    For Each w In .Presentations
    w.Save
    Next w
    .Quit
    End With
    End Sub

    Could I assign the previous macro when does any event happen? If there is
    possibility show me, please!

    Regards!
    Dennis

    "Tom Ogilvy" wrote:

    > 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!
    > > > > > >
    > > > > > >


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1