Thanks for the UDF tips Howard. Now I see the utility they have thought I coudnt help play with Shawn sample and gave more functionality.
With this sample $Remove can be a an array or a string and will be removed too.
Code:
Dim $y, $Array, $ArrayToRemove
$Array = "A1", "B2", "C3", "C4", "D5", "A1", "C1"
$Remove="A1","C1"
$NewBastaArray = TrimArray($Array,$Remove)
For Each $basta In $NewBastaArray
? $basta
Next
Function TrimArray($Array,$Remove)
Dim $i, $ar[Ubound($Array)]
$i = 0
Select
Case VarType($Remove)=8
For Each $Element In $Array
If $Element<>$Remove
$ar[$i] = $Element
$i = $i + 1
EndIf
Next
Case VarType($Remove)=8204
For Each $Element In $Array
$ExistRemove=AScan($Remove, $Element)
If $ExistRemove = -1
$ar[$i] = $Element
$i = $i + 1
EndIf
Next
Case VarType($Remove)<>8204 OR VarType($Remove)<>8
? "Not supperted value"
EndSelect
If $i
ReDim PRESERVE $ar[$i-1]
EndIf
$TrimArray = $ar
EndFunction
Intresting isnt it?