20 | 09 | 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 & "' ")
            MsgBox("The String does not Contains() '" & SearchValue & "'")
        End If

    End Sub

Sign up now and upload your code to the website.

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