Vacuum Sealed presented the following explanation :
> Hi Garry
>
> Apologies for late reply.
>
> Tried your response and came up empty, I realised why too.
>
>
> If UCase$(vData(i - 1)) = "NO"
>
> This will never equal "NO" as it is the name column.
>
> Also
>
> Can you clarify this statement for me so I better understand how this section
> of code works please...
>
> For i = 1 To UBound(vData)
> If Not InStr(1, sTemp, vData(i, 1), vbTextCompare) > 0 Then _
> sTemp = sTemp & "~" & vData(i, 1)
> Next
>
> In the If Not Instr() the criteria is numeric based, "Not Text" yet asks to
> compare text when constructing "sTemp", if this were the case then should not
> this be ( <>"" ).
>
> As always Garry, I appreciate your time
>
> TIA
> Mick
Since sTemp is a string, InStr() is using vbTextCompare to find the
value in vData(i, 1) [Row(i) of Col(1)]. The point is to only add
unique values to sTemp and restructure vData with only unique values.
Thus, you must check that each value in vData is not already in sTemp,
and if not then add it.
--
Garry
Free usenet access at
http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc