Hi guys,

say I have the following data in 4 array elements:

Code:
www.forum.co.za

www.vbforums.com

http://www.vbforums.com

[email protected]
I loop through each item in the array like this:

Code:
strEmailIn = Split(stremail, ",")
     
     Call BubbleSort1(strEmailIn)
     
     For C = 0 To UBound(strEmailIn())

       If C = 0 Then
        
         If Not InStr(strEmailIn(C), "@") = 0 Then
            strHTML = Replace(strHTML, strEmailIn(C), "<a href=""mailto:" & strEmailIn(C) & """> " & strEmailIn(C) & "</a>")
         Else
            strHTML = Replace(strHTML, strEmailIn(C), "<a  href=""http://" & Replace(strEmailIn(C) & """ target=""_blank""", "http://", "") & """> " & Replace(strEmailIn(C), "http://", "") & "</a> ")
         End If
       Else
          
            If (strEmailIn(C) <> strEmailIn(C - 1)) Then
                If Not InStr(strEmailIn(C), "@") = 0 Then
                    strHTML = Replace(strHTML, strEmailIn(C), "<a href=""mailto:" & strEmailIn(C) & """> " & strEmailIn(C) & "</a>")
                Else
                    strHTML = Replace(strHTML, strEmailIn(C), "<a  href=""http://" & Replace(strEmailIn(C) & """ target=""_blank""", "http://", "") & """> " & Replace(strEmailIn(C), "http://", "") & "</a> ")

                   End If
            End If
       
       
      End If
      
      
     Next C
im doing an rtb to html conversion. Problem is for example:

www.vbforums.co.za has been replaced with:

Code:
<a  href="http://www.vbforums.com" target="_blank""> www.vbforums.com</a>
but when the loop reaches:

http://www.vbforums.com it replaces the previous www.vbforums.com with another:

Code:
<a  href="http://www.vbforums.com" target="_blank""> www.vbforums.com</a>
and thus my html goes off.

How can I work around this