-1

I was wondering can I make an If condition that checks if the variable "a" contains the string "pass" and then print error message?

dim a as string
a = textbox1.text
if a = "pass" then
label1.text = "Error: you can't use the word PASS in your password"
end if

1 Answers1

0
dim a as string
a = textbox1.text
if InStr("fkvnfdpassknfd", "pass") > 0 then
label1.text = "Error: you can't use the word PASS in your password"
end if
Bilbo Baggins
  • 222
  • 3
  • 11
  • This question is a duplicate of https://stackoverflow.com/questions/15585058/check-if-a-string-contains-another-string, though – Bilbo Baggins Jun 07 '19 at 23:38