Delete every item beginning with the letter m the code


"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?

 

Solution Preview :

Prepared by a verified Expert
Visual Basic Programming: Delete every item beginning with the letter m the code
Reference No:- TGS01244081

Now Priced at $15 (50% Discount)

Recommended (99%)

Rated (4.3/5)