Thanks for your suggestions but I fixed the code by changing the integer to a string, I think Select Case didn't like the integer for some reason?
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim i As Integer = DGVShops.CurrentRow.Index
Dim c As Integer = DGVShops.Item(0, i).Value ' gets value from selected rows first column
Dim s As String = DGVShops.Item(2, i).Value ' gets a string which is the name (3rd column)
ShowMe(c, s) ' passes parameters
End Sub
Private Sub ShowMe(ByVal c, ByVal s)
Select Case c ' which should be an integer...
Case 1 To 46
label.Text = (s + " some text " + c)
End Select
End SubPrivate Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim i As Integer = DGVShops.CurrentRow.Index
Dim c As string= DGVShops.Item(0, i).Value ' gets value from selected rows first column
Dim s As String = DGVShops.Item(2, i).Value ' gets a string which is the name (3rd column)
ShowMe(c, s) ' passes parameters
End Sub
Private Sub ShowMe(ByVal c, ByVal s)
Select Case c ' which should be an integer...
Case 1 To 46
label.Text = (s + " some text " + c)
End Select
End Sub