Value of type '1-dimensional array of String' cannot be converted to '1-dimensional array of Integer' because 'String' is not derived from 'Integer'
<p>I am getting this error while trying to use a linear search to look for a name entered by the user into an array. Here is when I declare the array and get the input.</p>

<pre><code>Public Const SIZE_ARRAY = 9

Public Sub cmdStart_Click(sender As Object, e As EventArgs) Handles cmdStart.Click

Dim myArray(SIZE_ARRAY) As String
Dim index As Integer
Public Sub cmdStart_Click(sender As Object, e As EventArgs) Handles cmdStart.Click
    Dim count As Integer = 0

    For Me.index = 0 To SIZE_ARRAY
        myArray(index) = InputBox("Enter a name, Enter a name")
        count = count + 1
    Next

If count = 10 Then
        lblInstructions.Visible = False
        cmdStart.Visible = False
        lblInstructions2.Visible = True
        txtSearch.Visible = True
        lblOutput.Visible = True
        cmdSearch.Visible = True
    End If
End Sub
</code></pre>

<p>Here is where I use the linear search.</p>

<pre><code>Public Sub cmdSearch_Click(sender As Object, e As EventArgs) Handles cmdSearch.Click
    Dim found As Boolean
    Dim name As String

    name = txtSearch.Text

    found = LinearSearch(myArray, Val(name))

    If found Then
        lblOutput.Text = name &amp; " was found at cell " &amp; index
    Else
        lblOutput.Text = name &amp; " was not found"
    End If

End Sub
</code></pre>

<p>And here is the linear search function</p>

<pre><code>Public Function LinearSearch(ByVal list() As Integer, ByVal searchValue As Integer) As Boolean
    Dim found As Boolean = False
    Dim index As Integer
    While found = False And index &lt;= UBound(list)
        If list(index) = searchValue Then
            found = True
        Else
            index += 1
        End If
    End While
    Return found
End Function
</code></pre>