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

Re: Search string beginning at the end by Tony

Tony
Wed Oct 04 05:06:39 CDT 2006

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

"Frederick Lorca" <frederickglorca@fictitious.org> wrote in message
news:n66dndNplvWjp77YnZ2dnUVZ_v-dnZ2d@comcast.com...
> 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
>
>



Re: Search string beginning at the end by Frederick

Frederick
Wed Oct 04 21:52:31 CDT 2006


Thank you.


"Tony Jollans" <my forename at my surname dot com> wrote in message
news:eHeyT055GHA.3960@TK2MSFTNGP02.phx.gbl...
> 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
>
> "Frederick Lorca" <frederickglorca@fictitious.org> wrote in message
> news:n66dndNplvWjp77YnZ2dnUVZ_v-dnZ2d@comcast.com...
>> 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
>>
>>
>
>