VBA Msgbox code not working
Results 1 to 2 of 2

Thread: VBA Msgbox code not working
Thanks Thanks: 0 Likes Likes: 0

  1. #1
    New Member
    Join Date
    May 2019
    Post Thanks / Like
    0 Post(s)
    0 Thread(s)

    Default VBA Msgbox code not working

    Hey all, sorry to post to the wrong board but i am new here and could not find a thread about PowerPoint.
    With that being said I am trying to have a msgbox appear when the powerpoint file is opened, and then when the user decides to go to a next slide I want the same macro/msgbox to re-appear again, all the way throughout the slides. The code I have right now works to display the msgbox however I just dont know how to make it automatically run whenever the file is opened and from hoping to slide to slide.

    This is my current code:

    Option Explicit

    Sub Pop_Up()

    MsgBox "PowerPoint playback error. Verify that the necessarycodec for this media format is installed, and then try again.",vbOK + vbInformation
    End Sub

  2. #2
    Board Regular Rijnsent's Avatar
    Join Date
    Oct 2005
    Utrecht, Holland
    Post Thanks / Like
    1 Post(s)
    0 Thread(s)

    Default Re: VBA Msgbox code not working

    Hi Snelsonz,
    add a module in your PPTM file and add a macro named: Sub OnSlideShowPageChange()
    That macro will run when you run your PowerPoint and with every new sheet. There are a couple more "pre-named" macros that will run (you just have to add them to a module and add code to make them work), see e.g. this list: http://officeoneonline.com/vba/events_version.html
    Hope that helps,
    You can't post attachments here, but you can help me helping you by posting a screen shot directly in your post with any of those tools.
    Otherwise use dropbox/google drive/etc to get your file accross (not preferred). For code, put it inside these tags: [ CODE][/CODE]. Do check the forum rules.
    Finally, please show that you made an effort to solve your problem: Yes, I like to help, but am not going to do your job.

Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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