Link to home
Start Free TrialLog in
Avatar of blue220
blue220

asked on

LastWordTyped Function

Anyone know a function that will return the last word that is typed in a string regardless of where at in the string it's typed.

--------------------------------------------------------------------
Example #1

String: "The boy walked to the store"
(
This should return the word store NOT because it's the last word in the sentence but because it's the last word that I typed.)

--------------------------------------------------------------------


--------------------------------------------------------------------
Example #2

String: "The boy walked to the store"
           
Then I change the word "boy" to "girl" in the sentence above so it looks like this.

"The girl walked to the store"

(This should return the word girl since it was the last word that was typed even though it's not the last word in the sentence)

--------------------------------------------------------------------

I hope that makes sence and thanks for your replies in advance.
Avatar of ZhaawZ
ZhaawZ
Flag of Latvia image

Where do you type the word? Is it in your application? If yes, is it in some single control or in a whole app?
Avatar of blue220
blue220

ASKER

being a function I would expect it to work globally (atleast where you would expect type strings ie. in memos , edits , and richedits...) and yes it is in my app.
ASKER CERTIFIED SOLUTION
Avatar of Mike Littlewood
Mike Littlewood
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of blue220

ASKER

Thx for the reply I have been busy working on this project and although your code will not really work for me  this time I am sure I will find a use for it down the road so I will just award you the points for your effort.