How to Have a Drop-Down Box in PowerPoint
By Ryan Menezes
PowerPoint presentations can collect user input in addition to displaying static information. One way to collect input is to use a drop-down box, which offers a series of values from which users can choose. For example, if you create a presentation that clients use to customize their orders, a drop-down box can offer a selection of different sizes. Drop-down boxes are advanced controls that are only available through PowerPoint's Developer ribbon, and you must populate the drop-down box using Visual Basic code.
Click the "File" tab and select "Options" to open the PowerPoint Options dialog box.
Click "Customize Ribbon," click the check box next to "Developer," then click "OK."
Click the "Combo Box" icon in the Developer tab's Controls group, then drag and drop it over the slide to add the drop-down box.
Click "Visual Basic" in the ribbon's Code group to open PowerPoint's Visual Basic editor.
Type the following into the slide's code window to run a routine when the drop-down box first loads:
Private Sub ComboBox1_GotFocus() If ComboBox1.ListCount = 0 Then AddDropDownItems End If End Sub
Type the following code block to add items to the drop-down box:
Sub AddDropDownItems() ComboBox1.AddItem "1" ComboBox1.AddItem "2" ComboBox1.AddItem "3" ComboBox1.ListRows = 3 End Sub
Replace each of the elements in Step 7's example code with your data, adding new lines if necessary. For example, to add "Small," "Medium," "Large" and "Extra Large" to the drop-down box, change the code to the following:
Sub AddDropDownItems() ComboBox1.AddItem "Small" ComboBox1.AddItem "Medium" ComboBox1.AddItem "Large" ComboBox1.AddItem "Extra Large" ComboBox1.ListRows = 4 End Sub
Note that the value in "ComboBox1.ListRows" is now "4" because there are four values in the drop-down box.
Save and run your presentation to preview the populated drop-down box.
Ryan Menezes is a professional writer and blogger. He has a Bachelor of Science in journalism from Boston University and has written for the American Civil Liberties Union, the marketing firm InSegment and the project management service Assembla. He is also a member of Mensa and the American Parliamentary Debate Association.