Mega Code Archive

 
Categories / VisualBasic Script / String Functions
 

Use Like to compare strings

Sub CompareStrings()     Dim strString1 As String     Dim strString2 As String          strString1 = "Microsoft"          If strString1 Like "Micr*" Then     Debug.Print "True"     End If          If strString1 Like "Mic*t" Then     Debug.Print "True"     End If      End Sub