duplicate entries in combo box

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • trips
    New Member
    • Dec 2007
    • 3

    duplicate entries in combo box

    iam reading a xml file and adding these value into combo box.The combo box now has duplicate values ,when displaying in combo box i should not display duplicate values .how do i do it?
  • Dököll
    Recognized Expert Top Contributor
    • Nov 2006
    • 2379

    #2
    Originally posted by trips
    iam reading a xml file and adding these value into combo box.The combo box now has duplicate values ,when displaying in combo box i should not display duplicate values .how do i do it?
    Would you like to ad you code here, trips, for a quick look...

    Can be a pain solvong these, stay tuned to see what you can gather.

    In a bit!

    Comment

    • trips
      New Member
      • Dec 2007
      • 3

      #3
      Originally posted by Dököll
      Would you like to ad you code here, trips, for a quick look...

      Can be a pain solvong these, stay tuned to see what you can gather.

      In a bit!
      I want the answer in Visual Basics 6 not VB.net please

      Comment

      • lotus18
        Contributor
        • Nov 2007
        • 865

        #4
        Originally posted by trips
        I want the answer in Visual Basics 6 not VB.net please
        Hi trips

        Can you show us what have you done so far? So that we'll try to bring out the solution to your problem : )

        Rey Sean

        Comment

        • trips
          New Member
          • Dec 2007
          • 3

          #5
          Originally posted by lotus18
          Hi trips

          Can you show us what have you done so far? So that we'll try to bring out the solution to your problem : )

          Rey Sean
          Set aXmlNodeList = aXmlDom.documen tElement.select Nodes("//Department/Member")
          If (aXmlNodeList.l ength > 0) Then
          For ii = 0 To (aXmlNodeList.l ength - 1)

          aValue = aXmlNodeList.It em(ii).selectSi ngleNode("Role" ).Text
          Combo1.AddItem (aValue)

          Next
          If (Combo1.ListCou nt > 0) Then
          Combo1.Text = Combo1.List(0)
          End If

          Comment

          Working...