CountInStr

Counts the number of characters or characters groups in a string.

code format="vb" ' Counts the number splittables in a string function CountInStr(split$, text$) cnt = 0 cntinstr = 0

while instr(text$, split$, cntinstr) > 0 cnt = cnt + 1 cntinstr = instr(text$, split$, cntinstr) + 1 wend

CountInStr = cnt end function code