I tried to find the answer to my question in this newsgroup's Google archive
but didn't find anything specific to my question.
Suppose I have a string that's 40 characters in length. Starting from the
end of the string, I want to search backwards to find the first occurence of
a blank space. How do I do this? Also, what is the Chr number for a blank
space?
Frederick Lorca
Tony Jollans - 04 Oct 2006 11:06 GMT
Provided you have Word 2000 or later you can use InStrRev
TestString = "Forty characters of text as illustration"
Msgbox "The last space is at position " & InStrRev(TextString, " ")
--
Enjoy,
Tony
> I tried to find the answer to my question in this newsgroup's Google archive
> but didn't find anything specific to my question.
[quoted text clipped - 5 lines]
>
> Frederick Lorca
Frederick Lorca - 05 Oct 2006 03:52 GMT
Thank you.
> Provided you have Word 2000 or later you can use InStrRev
>
[quoted text clipped - 18 lines]
>>
>> Frederick Lorca