2
votes

I have a PowerPoint presentation which consists of a single slide and some VBA code. The code displays a dialog box (not inside the presentation) which configures the slide. I need the code to be started when the presentation is started. I found various suggestions and ended up going with this one however I am getting inconsistent results!

If I do the following, in sequence, it works:

  1. Open presentation in PowerPoint
  2. Select Developer tab
  3. Select Visual Basic (to open VBA editor)
  4. Close VBA editor
  5. Select Slide Show tab
  6. Select From Beginning

However, if I skip steps 2-4, it does not! I.E.: 1. Open presentation in PowerPoint 2. Select Slide Show tab 3. Select From Beginning

It is almost as though Visual Basic support isn't even loading until the editor is opened.

I also tried adding a slide before my main one with an auto-transition immediately and again, no-go.

This is driving me insane as I need to get this deployed to the rest of my department.

Anyone have any ideas?

1
If the VBA runs into an error during a slide presentation, it'll do exactly what you've described. It appears not to run and the user will see no error messages. What does the VBA do? Can you post it here?Steve Rindsberg
It's somewhat long, but I will do. The presentation is a Break and Lab exercise timer. So the dialog allows the Lecturer to specify the length of the break and / or Lab time and to choose which Labs (if any) to assign. There is then a button that starts the clock. What I don't understand is that there are no VBA errors, as far as I can tell. If I open the VBA editor prior to starting the slide show, it works perfectly..... :-/Paul
You can post it here or if it's more convenient, post the presentation containing the code on OneDrive/Dropbox/etc and post the link here.Steve Rindsberg
Ok, here it is.Paul

1 Answers

3
votes

It's kind of a known problem.

OnSlideShowPageChange sometimes doesn't fire. To get around it, add any of the Active-X controls from the Developer tab to the first slide. Scoot it off the slide if you don't want it visible.

Somehow the control forces VBA to initialize, so events fire.

After I did this with your presentation, it fired off right away.