24 | 03 | 2017

Is a String Containing a String

To check if a string contains a specific value or string use the code below:

    Sub TestSearchString()

        Dim FullString, SearchValue As String
        FullString = "VisibleVisual.COM" 'Specify a string
        SearchValue = "visible" 'specify a substring or value to look for in the string

        If FullString.Contains("Visible") = True Then
            MsgBox("The string Contains() '" & SearchValue & "' ")
        Else
            MsgBox("The String does not Contains() '" & SearchValue & "'")
        End If

    End Sub
Login

Sign up now and upload your code to the website.

Help us to continue.....
Statistics
Articles View Hits
2206780
Latest Articles