Andrew Henz Andrew Henz - 4 months ago 29 Question

VB.NET Get text from textbox without a specific string

How can I make something like in
When Button 1 clicked:

Textbox1.text = "big banana"
dim string as string = "big"
MsgBox(Textbox1.Text without string)

Output: banana


You can do something like this. For example you have 2 textboxes the 1st one is the textbox that you will input the words you like and the second one is the textbox that you will use to remove a specific word in textbox1. Do something like this.

Dim StringToRemove as String = TextBox2.text
If Textbox1.Text.Contains(StringToRemove) then
Msgbox("The word you want to remove doesnt exist.")
End If

enter image description here

Sorry for the headers thats Sample 1 and Sample 2. At least you have a full working code with parameters with this one, checks if the word you want to remove exist.