This may not be the most efficient but it should work. It assumes that you have lstMaster, lstSecondary, lstMerged, and a command button to merge them.
Code:Private Sub Command1_Click() lstMerged.Clear Dim x As Integer For x = 0 To lstMaster.ListCount - 1 '-add all of lstMaster to merged list lstMerged.AddItem lstMaster.List(x) Next x Dim y As Integer Dim Already As Boolean For x = 0 To lstSecondary.ListCount - 1 '-Check each entry in lstSecondary vs all of merged list For y = 0 To lstMerged.ListCount - 1 If lstMerged.List(y) = lstSecondary.List(x) Then Already = True End If Next y If Already = False Then lstMerged.AddItem lstSecondary.List(x) End If Already = False Next x End Sub




Reply With Quote