VBA & Macro Problems

Move PowerPoint Game Tokens During a Slide Show with VBA

Chanuka GeekiyanageChanuka Geekiyanage Nov 14, 2026 868 views

Question details

Move board-game tokens while a PowerPoint slide show is running without using standard animation effects.

Move PowerPoint Game Tokens During a Slide Show with VBA
Product
Microsoft PowerPoint
Device & OS
not provided
Scenario
A PowerPoint board game needs a way to reposition tokens during presentation mode.
Observed behavior
The desired result is for a token to move to new coordinates during the slide show.
Before you start

Open the presentation in desktop PowerPoint and make sure the Developer tab is available. Save the file as a macro-enabled PowerPoint presentation (.pptm) and enable macros only if you trust the file.

Solution 1Recommended

Move a Named Token with a PowerPoint VBA Macro

Use a clickable shape to run a macro that changes a token's position during the slide show.

The macro below finds a shape named Token on the currently displayed slide and moves it 50 points to the right and 20 points down. It changes the shape's position directly rather than using an animation effect.

1
Name the token

On the game slide, open Home > Arrange > Selection Pane and rename the token shape to Token.

2
Add the macro

Open Developer > Visual Basic, choose Insert > Module, and paste this code: Sub MoveToken() Dim token As Shape Set token = SlideShowWindows(1).View.Slide.Shapes("Token") token.Left = token.Left + 50 token.Top = token.Top + 20 End Sub

3
Create a clickable control

Return to the slide and use Insert > Shapes to add a button or other shape. Select it, open Insert > Action, choose Mouse Click > Run macro, and select MoveToken.

4
Test the movement

Save the presentation as a .pptm file, start Slide Show > From Current Slide, and click the control. Adjust the numbers in the macro to change the distance or direction.

Move a Named Token with a PowerPoint VBA Macro
For incremental movement: To make movement appear smoother, update Left and Top in small increments in a loop and call DoEvents between updates. The apparent speed depends on how quickly the loop runs.
Free Microsoft Office alternative

Edit Your Game Slides with WPS Presentation

WPS Office is a free, lightweight Office alternative with a familiar interface for editing presentations and moving existing files into your workflow. It does not fix PowerPoint's VBA behavior, and macro support may differ by version.

Create and edit board-game slides and shapesOpen and edit Microsoft PowerPoint PPT and PPTX filesUse familiar presentation editing toolsWork with a lightweight Office suite available for free
microsoft office alternative - wps office

Frequently Asked Questions

Can I move a token without a PowerPoint animation?

Yes. A VBA macro can change the token's Left and Top properties directly while the slide show is running.

How do I make the macro move a different token?

Open Home > Arrange > Selection Pane to find or change the shape's name, then replace Token in Shapes("Token") with that name. The named shape must be on the currently displayed slide.

Why isn't my macro available in the Action dialog?

Check that the macro is in a standard module, is declared as a public Sub with no arguments, and that the presentation is saved as a .pptm file. Also check your macro security settings and enable macros only for a trusted file.

How can I move the token in another direction?

Edit the values added to Left and Top in Developer > Visual Basic. Subtract from Left to move left or subtract from Top to move up.