A quick loop will work

VB Code:
  1. Do
  2.         If InStr(1, strTemp, "xx") = 0 Then Exit Do
  3.         strTemp = Replace(strTemp, "xx", "x")
  4.     Loop