How to Use a VBA ComboBox in PowerPoint

Written by jaime avelar | 13/05/2017
How to Use a VBA ComboBox in PowerPoint
Switch slides using Visual Basic in PowerPoint. (Creatas Images/Creatas/Getty Images)

Adding a ComboBox control to your PowerPoint presentation can solve the problem of navigating through the slides in your presentation when you want to quickly show a slide toward the end. A ComboBox control can be used to display a list of items representing the slides in your presentation. Use Visual Basic for Applications (VBA) to add items to the ComboBox control and also execute events when an item has changed in your ComboBox.

Launch PowerPoint and click "New Slide" to display the Office Theme of slides. Click "Blank" to insert a blank slide. Insert another slide using the same technique.

Click the "Developer" tab. Click "ComboBox" on the "Controls" pane and click a location on the slide where you want to place the ComboBox. Add a button using the same technique.

Double-click the button to create a click event and add the following code to add two items to the ComboBox control:

ComboBox1.AddItem ("Slide 2")

Switch back to PowerPoint and click slide number one from the left pane of your computer screen. Double-click the ComboBox control to create a change event for the control. Add the following code to switch slides by using the combo box:

If (ComboBox1.Text = "Slide 2") Then

Switch back to PowerPoint and click the "Slide Show" menu. Click "From Beginning" and click the command button to fill the ComboBox. Select a slide to go to from the ComboBox items list.

By using the site, you consent to the use of cookies. For more information, please see our Cookie policy.