How do you remove the dupes in a listbox?

I tried doing it like this

VB Code:
  1. Dim Intx as integer
  2.  
  3. for intx = 0 to list1.listcount - 1
  4.  
  5. if list1.list(intx) = list1.text then
  6. list1.removeitem(intx)
  7. end if
  8.  
  9. next intx

Thanks,
Sir Loin