Explore BrainMass
Share

Explore BrainMass

    Remove an item from combo box based on first letter in Visual Basic

    This content was COPIED from BrainMass.com - View the original, and get the already-completed solution here!

    "In the following exercises, assume that the Simple combo box appears as shown and that the Sorted property is set to True. Give a statement or statements that will carry out the stated task."

    The combo box contains:
    Dante
    Goethe
    Moliere
    Shakespeare

    1. Delete the name Goethe.
    2. Insert the name Cervantes.
    3. Delete every item beginning with the letter M. The code should do the job even if additional items were added to the list.

    Here is what I did for 1 and 2:
    1) cboBox.Items.Remove("Goethe")
    2) cboBox.Items.Add("Cervantes")

    How do I delete an item based on its first letter?

    © BrainMass Inc. brainmass.com October 9, 2019, 9:12 pm ad1c9bdddf
    https://brainmass.com/computer-science/visual-basic/software-deleting-items-based-first-letter-177008

    Solution Summary

    This solution provides guidelines on how to carry out different tasks in computer programming (deleting items and entries).

    $2.19