Share via

PowerPoint VBA doesn't function every time you open

Anonymous
2018-09-05T20:59:28+00:00

Hello community,

I have a VBA code attached to one of the slides on the PowerPoint and the slide functions smoothly when I run the VBA code. But when I close the pptm file and open again, I don't see the slide picking up the VBA code. I will have to run the VBA code again for the slide to work.

This fails the whole purpose of automating the slides in ppt using VBA. Can anyone explain me how do I instruct the PowerPoint to automatically run the VBA every time I open the pptm file?

Thank you, your help will be much appreciated!

Best,

-Amrut Deshpande

Microsoft 365 and Office | PowerPoint | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

2 answers

Sort by: Most helpful
  1. Anonymous
    2018-09-06T20:09:26+00:00

    Are you maybe trying to use code that includes "OnSlideShowPageChange" ?

    Was this answer helpful?

    2 people found this answer helpful.
    0 comments No comments
  2. Steve Rindsberg 99,161 Reputation points MVP Volunteer Moderator
    2018-09-06T19:38:46+00:00

    PowerPoint doesn't automatically run VBA code when you open files.

    If you need the code to run during a slide show, you can add a first "welcome" slide and put a "Click here to start the show" bit of text on the slide.  Give the text box containing the text a Run Macro action setting and set it to run your macro code (and add a bit of extra code to have it advance to the next slide automatically).

    Was this answer helpful?

    0 comments No comments