Hello Daniweb Community,
I was wondering if there is a way to replace words from a listbox.
So at the moment I've got a listbox with a couple of strings to be replaced in the textbox, however single line listbox items work but when I add a multi-lined item eg.
Hello
There
It'll go into the listbox as HelloThere, so when I go to use the for each to replace them It doesn't work.
I've tried manually replacing it by using TextBox1.Text = TextBox1.Text.Replace("Hello" & Environment.NewLine & "There")
it'll work, and if I try
For Each lbItem In .ListBox1.Items
TextBox1.Text = Replace(TextBox1.Text, lbItem, "{HIDDED}")
Next
it doesn't work.
Any ideas why this is happening?