View Full Version : Userform Contacts.

06-25-2009, 05:55 AM
Hello everyone.

I guess you would say im at the newborn stage of understand VB. Ive done a few projects now. The current one that im working on is prity much a knock off of the contacts used in Axcess. Its like a learning experiance for me.

There are a few issues with it that i hope someone will work with me on.
1 (module matchsearch) Being new to doing loops, i have the loop all screwed up.

2. (module Makecblist) To see how it should work remove

Dim a, e, w()

a = rSource

With CreateObject("Scripting.Dictionary")
.CompareMode = vbTextCompare
For Each e In a
If e <> "" Then
If Not .exists(e) Then
.Item(e) = VBA.Array(e, "(1)")
w = .Item(e)
w(1) = "(" & Replace(Replace(w(1), "(", ""), ")", "") + 1 & ")"
.Item(e) = w
End If
End If
Combobox_List_Search.ComboBox1.List = _
End With From the module and insert some things into column A, And type into combobox1.
Though i would like to remove duplicates from the list and this is where im having trouble.

Thankyou in advance.

lve also asked the same thing at

06-25-2009, 02:59 PM
Hi D_Rennie, Welcome to the VBA Express forum.

2007 has a function available (Data, Data Tools, Remove Duplicates). To find out how this might look use the Macro Recorder and use the Excel tool, then post your code to the forum, if you require assistance to modify the code.

When indicating where you might have asked the same or similar question please insert the URL address as the link.

06-26-2009, 08:55 AM
Cheers AussieBear.
With the function (Data, Data Tools, Remove Duplicates)
Code responce for Coumn B would be.

ActiveSheet.Range("$B$1:$B$11").RemoveDuplicates Columns:=1, Header:=xlNo
Not realy what i was after as i would like to keep duplicates on the sheet.

This question is being worked upon for the pitucular needs. And ill post the solved solution here once everythink has been worked out.
Thanks again