logo
search
Others

How to Display an Image Based on a Drop-Down Selection in PowerPoint VBA

Natalie TaylorNatalie Taylor Oct 20, 2026 868 views

Question details

The user wants to dynamically change and display a corresponding image on a PowerPoint slide based on the value selected from a drop-down list.

How to Display an Image Based on a Drop-Down Selection in PowerPoint VBA
Product
PowerPoint
Device & OS
Windows
Scenario
Creating an interactive presentation where images change depending on the user's drop-down choice, such as selecting a specific item name to view its respective picture.
Observed behavior
Standard PowerPoint controls do not natively support dynamic image switching from a drop-down list, requiring a VBA macro to hide and show specific image shapes.
Before you start

Ensure that the Developer tab is enabled in your PowerPoint ribbon, as you will need it to insert drop-down controls (ActiveX or Form controls) and write the necessary VBA macro code.

Solution 1Recommended

Use VBA to Show and Hide Images via Drop-Down Change Event

Add all required images to the slide, rename them to match your drop-down options, and use a VBA macro to toggle their visibility based on the user's selection.

Since standard PowerPoint features do not allow images to change based on a drop-down list natively, you must insert all images onto the slide, name them appropriately, and utilize a VBA change event. The macro will automatically hide the inactive images and make only the selected one visible.

1
Insert the Drop-Down Control

Navigate to the Developer tab, click on the Combo Box (ActiveX Control) icon, and draw it on your slide. Populate the combo box with your selection items using VBA during the slide initialization.

2
Insert and Name Images

Add all the images you want to display onto the slide. Open the Selection Pane by going to Home > Select > Selection Pane. Rename each image shape exactly as it appears in your drop-down list (e.g., "Tenderloin"). Hide all images except the default one.

3
Write the VBA Macro

Double-click the drop-down control to open the VBA Editor. In the Change event of the combo box, write a script to loop through all your specified images, setting their Visible property to msoFalse. Then, set the Visible property of the image that matches the drop-down's .Text value to msoTrue.

4
Save as Macro-Enabled Presentation

Go to File > Save As and choose 'PowerPoint Macro-Enabled Presentation (*.pptm)'. This ensures your VBA code is preserved and runs properly when the presentation is opened.

Use VBA to Show and Hide Images via Drop-Down Change Event
Enable Macros: When reopening the presentation, users must click 'Enable Content' to allow the VBA macro to execute the drop-down image changes.
Create Dynamic Slides in WPS

Use WPS Presentation for Interactive Slideshows

WPS Presentation allows you to build engaging, interactive slideshows seamlessly. With its built-in developer tools (available in versions with VBA support), you can easily insert drop-down controls and run VBA macros to dynamically switch images, just like in Microsoft PowerPoint.

  1. 1. Open Developer Tools: In WPS Presentation, navigate to the Developer tab to access interactive controls like Combo Boxes and Command Buttons.
  2. 2. Insert Drop-Down and Images: Place your Combo Box and multiple images onto the slide, arranging them for your optimal presentation layout.
  3. 3. Write Macro Code: Use the built-in VBA editor to write the code that toggles image visibility based on the drop-down selection.
  4. 4. Save the Presentation: Save your file as a Macro-Enabled Presentation (.pptm) to ensure seamless playback and functionality.
Fully compatible with Microsoft PowerPoint (.pptm) macro-enabled files.Intuitive developer tab for adding interactive form controls easily.Lightweight software for fast rendering of complex, dynamic presentations.
microsoft office alternative - wps office

Frequently Asked Questions

Why is my drop-down macro not working in Slide Show mode?

Macros might be disabled by your Trust Center settings. Ensure you have saved the file as a .pptm and click "Enable Content" when opening the file. Additionally, ActiveX controls require you to be in Slide Show mode to interact with them properly.

Can I dynamically change images without using VBA?

In standard PowerPoint, there is no built-in feature to change images dynamically based on a drop-down list without VBA. However, you can use Hyperlinks linked to hidden slides or Morph transitions as a non-VBA workaround to simulate this interactivity.

How do I correctly name a shape or image for the VBA code?

Navigate to the Home tab, click on Select in the Editing group, and choose Selection Pane. In the panel that appears on the right, double-click the current name of the image and type your new name to perfectly match the drop-down selection.