vbscript check if string contains

The solution for “vbscript check if string contains” can be found here. The following code will assist you in solving the problem.

Dim MyString = “Hello world!”

‘InStr returns the position of the first occurrence of the specified string within another.
‘So checking if the number returned is higher then 0 means checking if its found
If InStr(MyString, “world”) > 0 Then
‘I exist!
End If

Thank you for using DeclareCode; We hope you were able to resolve the issue.

More questions on [categories-list]

Similar Posts