Odstran∞nφ duplicitnφch polo₧ek v Combu

Postup:
Zalo₧te nov² projekt a na formulß° p°idejte tlaΦφtko a ComboBox. Na udßlost Form_Load zapiÜte:

Private Sub Form_Load()

   With Combo1
      .AddItem "Bozena"
      .AddItem "bozena"
      .AddItem "Tßbor"
      .AddItem "tßbor"
      .AddItem "Ahoj"
      .AddItem "ahoj"
   End With

End Sub

Na udßlost Click tlaΦφtka nynφ zapiÜte k≤d pro odstran∞nφ duplicitnφch polo₧ek:

Private Sub Command1_Click()

   For i = 0 To CBDupes.ListCount - 1
      For x = 0 To CBDupes.ListCount - 1
         If i = x Then GoTo Nextx
         If LCase(CBDupes.List(x)) = LCase(CBDupes.List(i)) Then
            CBDupes.RemoveItem x
         End If

Nextx:
      Next x
   Next i

End Sub

Spus¥te projekt, prohlφdn∞te si polo₧ky v Combu a pak klikn∞te na tlaΦφtko. Znovu si prohlΘdn∞te polo₧ky v Combu. Duplicitnφ polo₧ky jsou nynφ odstran∞ny.

Zp∞t

Autor: The Bozena