user3013264
user3013264

Reputation: 11

Controlling VBA Powerpoint autoevents from a checkbox on the PowerPoint ribbon

I have a PowerPoint add-in with auto events which run when the presentation is saved or closed (e.g. updating footer, slide numbers). I would like these functions to be disabled through checkboxes on the ribbon. I've created the checkboxes in XML, but can't work out how to write the code to check their status and then run/not run my subs. I also want their status to be remembered when powerpoint is closed so next time it is opened, they are loaded correctly.

Any help would be appreciated, as I am getting very confused.

Upvotes: 0

Views: 428

Answers (1)

Olle Sjögren
Olle Sjögren

Reputation: 5385

You ask several questions. You have to try to isolate the different parts into separate questions. That said, here's my suggestion:

  1. When a checkbox is checked, set a global variable in the addin in a vba callback function.
  2. The variable can be saved to the registry or a settings file right away or when PowerPoint closes.
  3. When the auto events trigger, check the variable set in step 1.

Upvotes: 1

Related Questions