OK, I am extremely sorry for my noisiness but I have a question involving the string replace function in Visual Basic. Though this seems simple, and probably is, I have searched everywhere and no found an answer. Here is my question:
I have a Visual Basic script for my project. I have a rich text box named 'sample'
Dim string1 as string = "text to find" Dim string2 as string = "text to replace find with" Dim mediacurrent as string mediacurrent = sample.text mediacurrent.replace(string1, string2) sample.text = mediacurrent
The above script returns a blank text box. Note the text box is rich and contains non-formatted but multiline text. What am I doing wrong?