VBA Msgbox code not working

Snelsonz71

New Member
Joined
May 6, 2019
Messages
1
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








 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
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,
Koen
 
Upvote 0

Forum statistics

Threads
1,213,532
Messages
6,114,176
Members
448,554
Latest member
Gleisner2

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top