that;s a good one thanks
"Manohar Kamath [MVP]" <> wrote in message
news:...
> One way to do this is kinda a round about way. Use the Split function to
> split the string into an array, and count the number of array elements,
> minus one.
>
> Dim arElem
> Dim myString
> Dim mySubString
>
> myString = "this contains the word how many times just one time"
> mySubString = "how many times"
> arElem = Split(myString, mySubString)
>
> Response.Write("Number of times: " & UBound(arElem))
>
> You could also use the InStr function, and loop through the first ring to
> count number of times the string appears.
>
> --
> Manohar Kamath
> Editor, .netBooks
> www.dotnetbooks.com
>
>
> "Bite My Bubbles" <> wrote in message
> news:...
> > How can i count the number of times a string appears within another
> string.
> > Thanks a
> >
>
lot!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!
> > !!
> >
> >
>
>