using repalce like that is VERY slow, your arguments are not right.
since evry time it will loop trough the whole string while it has found its match already (count = -1)
maybe thats why bruce got confused
try this instead(out of hand) i cant think of anything faster
VB Code:
dim iX as long dim iY as long dim iZ as long iz = len("replaced") ix = instr(1, strLargeString, "{", vbtextcompare) do while ix > 0 iy = iy +1 strLargeString = Replace(strLargeString, "{" & iy & "}", "replaced", ix, 1, vbtextcompare) ix = instr(ix + iz, strLargeString, "{", vbtextcompare) loop




Reply With Quote