◄Example► ◄Contents► ◄Index► ◄Back► ────────────────────────────────────────────────────────────────────────────── ' The example updates a combo box based on the user's selection in an option ' button group. ' To try this example: ' 1. Choose New Project from the File menu ' 2. Choose New Form from the File menu to create a form with: ' • Combo box ' • Two option buttons ' 3. Set the CtlName property for both option buttons to "OptionGroup" ' 4. Press Alt+F4 to return to the programming environment ' 5. Copy the code example below to the form module ' 6. Press F5 to run the example SUB Combo1_DropDown () WHILE Combo1.ListCount ' Delete existing items Combo1.REMOVEITEM 0 WEND IF OptionGroup(0).Value = -1 THEN Combo1.ADDITEM "Gray Goose Express", 0 Combo1.ADDITEM "Wild Fargo Carriers", 1 ELSE Combo1.ADDITEM "Pegasus Overnight" END IF END SUB