没看懂你要表达什么,报错?
Dim str0 As New List (Of String)
Dim str1 As New List (Of String)
Dim id0,id1,flt,celltext As String
For Each dr As DataRow In DataTables("表B").dataRows
If dr("任务").StartsWith("#") =True Then
Dim mc = System.Text.RegularExpressions.Regex.Matches(dr("任务"), "[#0-9]+")
celltext=Nothing
'For i As Integer = 0 To Lmst.Length-1
celltext = mc(0).value
'Next
If str0.Contains(celltext) =False Then
id0 + = dr("_Identify") & ","
Else
str1.Add(celltext)
End If
str0.Add(celltext)
End If
Next
msgbox(id0)
'++++++++++++++++++++++++++++++++
For Each dr As DataRow In DataTables("表B").dataRows
If dr("任务").StartsWith("#") =True Then
Dim mc = System.Text.RegularExpressions.Regex.Matches(dr("任务"), "[#0-9]+")
celltext=Nothing
'For i As Integer = 0 To Lmst.Length-1
celltext= mc(0).value
'Next
If str1.Contains(celltext) Then
id1 + = dr("_Identify") & ","
End If
End If
Next
msgbox(id1)
'+++++++++++++++++++++++++++++++++
If id1 > "" Then
id1 = id1.Trim(",")
flt = "[_Identify] In (" & id1 & ")"
End If
msgbox(flt)
DataTables("表B").loadFilter = flt
DataTables("表B").load()