D
Dave B
Is there a better way to count the number of words in a string than:
intWords = 1
For i = 1 To Len(strIssuerName)
If Mid(strIssuerName, i, 1) = " " Then intWords = intWords + 1
Next i
? This obviously isn't perfect since if there were two spaces in a row it
would count an extra word...
Also, is there an easy way to pick off the last two words in a string? I'm
currently using ExtractElement from one of J Walkenbach's books.
Thanks.
Dave
intWords = 1
For i = 1 To Len(strIssuerName)
If Mid(strIssuerName, i, 1) = " " Then intWords = intWords + 1
Next i
? This obviously isn't perfect since if there were two spaces in a row it
would count an extra word...
Also, is there an easy way to pick off the last two words in a string? I'm
currently using ExtractElement from one of J Walkenbach's books.
Thanks.
Dave