"specified cast not valid" error happens while cycling through ListItems In .SelectedItems
Posted on 2006-11-03
Private Function CountyCodeSQL() As String
Dim lvItem As ListViewItem
Dim str As String
If .SelectedItems.Count > 0 Then
For Each lvItem In .SelectedItems ERROR on this line*****
str = str & ", '" & lvItem.Text & "'"
CountyCodeSQL = str
*******SPECIFIED CAST IS NOT VALID
I'm new to .net and this doesn't make any sense to me. Thanks for any help.