I'm trying to have a counter in all slides of a powerpoint presentation. The counter needs be controlled a button in all slides that increases it.

I can do it for one specific slide, but when I do it with a slide master it doesn't refresh the screen during Slideshow mode. I have to exit slideshow and enter again to see the changes.

Code that doesn't refresh in Slideshow mode:

ctr = ctr + 1
ActivePresentation.Designs(1).SlideMaster.Shapes("Counter").TextFrame2.TextRange.Text = ctr

Code that works (but only applies to one slide, not all slides in presentation):

ctr = ctr + 1
ActivePresentation.Slides(1).Shapes("Counter").TextFrame2.TextRange.Text = ctr


What about just inserting ‹Nr.› into your textbox without VBA. This will update automatically.

Or just click on SlideNumber in the Insert tab of your menu bar while your cursor is in your textbox

  • (1) ‘‘The counter needs be controlled [by] a button’’ — apparently the OP does not want something that updates automatically. (2) ‘‘from Slideshow Mode’’ — the menu bar isn't accessible in Slideshow Mode. – Scott Aug 9 '17 at 7:46

Your Answer


By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.