Put all the codes into a list. Either on text changed or button pressed event just use is in list thing (textbox text) list(variable)
is in list thing (textbox text) list(variable)