Advertisement
Guest User

ased

a guest
Nov 1st, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Set objDictionary = CreateObject("Scripting.Dictionary")
  2.  
  3. arrItems = Array("a","b","b","c","c","c","d","e","e","e")
  4.  
  5.  
  6. For Each strItem in arrItems
  7.  
  8.     If Not objDictionary.Exists(strItem) Then
  9.  
  10.         objDictionary.Add strItem, strItem
  11.  
  12.     End If
  13.  
  14. Next
  15.  
  16.  
  17. intItems = objDictionary.Count - 1
  18.  
  19.  
  20. ReDim arrItems(intItems)
  21.  
  22.  
  23. i = 0
  24.  
  25.  
  26. For Each strKey in objDictionary.Keys
  27.  
  28.     arrItems(i) = strKey
  29.  
  30.     i = i + 1
  31.  
  32. Next
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement