Dim dict As new Dictionary(of String,Integer)
Dim s As String = e.DataRow("代理案件")
If s >"" Then
s = s.replace(vbcr, "")
Dim fls() As String = s.split(vblf)
For Each f As String In fls
Dim s1 As String = f.SubString(1,4)
If dict.ContainsKey(s1) Then
dict(s1) = dict(s1) + 1
Else
dict.Add(s1,1)
End If
Next
Dim s2 As String = ""
For Each key As String In dict.Keys
s2 = s2 & key & "-" & dict(key) & vbcrlf
Next
msgbox(s2.Trim(vbcrlf))
Else
e.DataRow.delete
End If