and I was having trouble with a certain function in my program. I'm trying to delete a SINGLE instance of a string of text in a textbox, instead of all instances of the string in the textbox.
Here is my code for the button that I want to execute this function in:
If codon.Text.Contains(U.Text + "-") Then
codon.Text = codon.Text.Replace(U.Text + "-", "")
End If
So, this code replaces a string in codon.text with nothing, in other words, it deletes it.
When I click the button my cursor is hovering over, it deletes every instance of, say, UUG. I wanted to see if there was a way to delete only one instance of UUG.
