Consulting

Results 1 to 8 of 8

Thread: Close presentation Userform

  1. #1
    VBAX Regular
    Joined
    Apr 2014
    Posts
    7
    Location

    Close presentation Userform

    Hi Guys

    I have made a HUGE PowerPoint presentation and when i want to quit it, i have to press "Esc" alot of times because it wants me to close every single slide show that i've been in from a linked folder. Because of that i was wondering if i could make a "X" shape in the top right corner and when i press it a userform wil appear with something like "Are you sure you wanna Quit" - "Yes" and "No", is that even possible? It would save me alot of time not quitting 1 slide at a time

    Thank you for takijng your time reading this.
    -Rass

  2. #2
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,095
    Location
    If your red X runs this macro i think it would close all shows.

    Sub chexClose()
    If MsgBox("Do you want to quit?", vbYesNo, "Quit?") = vbYes Then
    While SlideShowWindows.Count > 0
    SlideShowWindows(1).View.Exit
    Wend
    End If
    End Sub
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

  3. #3
    VBAX Regular
    Joined
    Apr 2014
    Posts
    7
    Location
    Hi John Wilson
    To be honest, i have no idea how to make it run that macro and i have been thinking about finding a Picture on Google of a red "X" that looks a Little bit more fancy Can you describe a how i make it Work please?


    Thanks for taking time so far.
    -Rass

  4. #4
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,095
    Location
    OK

    Find the image (try here)

    I would insert it on the large slide master of the last presentation OR on the last slide

    Open the last presentation (work on a COPPY!) and press ALT + f11. The vb editor should open

    INSERT > Module (make sure you are using the INSERT menu in the editor not the normal insert)

    Copy the code below and paste it into the editor

    Sub chexClose()
    If MsgBox("Do you want to quit?", vbYesNo, "Quit?") = vbYes Then
    While SlideShowWindows.Count > 0
    SlideShowWindows(1).View.Exit
    Wend
    End If
    End Sub

    Now go back to normal edit mode and select the red x. INSERT > Action and choose Run Macro.

    Note this will only run the macro in show mode.

    Save the last presentation as a macro enable presentation .pptm

    TEST

    If you get stuck try this as your last presentation

    DOWNLOAD DEMO
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

  5. #5
    VBAX Regular
    Joined
    Apr 2014
    Posts
    7
    Location
    Thanks alot, but what if i want to write "Ja" and "Nej" instead of "Yes" and "No" in the userform? Where do i change that?

    And you're "THE MAAAAAN", i can't tell you how happy i am right now, THANKS!!

    -Rass

  6. #6
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,095
    Location
    If you use a message box (much easier) then you are stuck with YES and NO (maybe if you change the language??)

    To use a userform with custom text is a little harder and it looks like you have limited experience!
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

  7. #7
    VBAX Regular
    Joined
    Apr 2014
    Posts
    7
    Location
    So if i change the language in my Powerpoint from English to Danish it will just change it?

    -Rass

  8. #8
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,095
    Location
    I'm really not sure. My guess is you would need a version that has the ribbon in Danish not just change the proofing language.
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

Posting Permissions

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