View Single Post
Old 05-17-2004, 07:57 AM  
More Booze
Confirmed User
 
Join Date: Mar 2004
Posts: 5,116
Visual Basic programmers, Help needed!

I wrote a function which picks a random word from a listbox.
The function is called "RANDOMWORD".

I got a textbox with the text
"Hi I am (WORD). I like to (WORD) and (WORD)."

I want to replace all (WORD) with random words but if
I use
document = Replace(document, "(WORD)", RANDOMWORD)
it will change all (WORD) to the same random word.

How should I do to get a new word for each (WORD) in the textbox?
(In the exeample its only 3 (WORD) but it vary)
More Booze is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote