Here's an example of what i try to archive
VB Code:
  1. Public arrTemp() as String
  2.  
  3. Private Sub Command1_Click()
  4. 'Cannot Redim Preserve here since i don't know the size
  5. For i = 0 to Ubound(arrTemp)
  6. 'code to compare array
  7. If  condition = arrTemp(i) then exit sub
  8. Next
  9.  
  10. ReDim Preserve arrTemp(UBound(arrTemp) + 1)
  11. arrTemp(UBound(arrTemp)) = "abc [" & "]"
  12.  
  13. End Sub
  14.  
  15. Private Sub Command2_Click()
  16. 'Remove ArrTemp Items no problem here
  17. End Sub

hope you guys understand what i try to mean