回复 2楼 风吹过b
谢谢版主, 我已经将数据读入到VB6, 有空请帮帮忙,指点指点!谢谢
[此贴子已经被作者于2016-2-2 11:51编辑过]
Dim Dic As New Dictionary Dim Brr(), K& Public Sub SubBom(ByVal keyWords$, ByVal BomList As Variant) Dim i& For i = 2 To UBound(BomList) If keyWords = BomList(i, 1) Then Dic(BomList(i, 2)) = i SubBom BomList(i, 2), BomList End If Next End Sub Public Function Bom(ByVal keyWord As Variant, ByVal BomList As Variant) Dim j&, i& For j = 1 To UBound(keyWord) Set Dic = Nothing SubBom keyWord(j, 1), BomList For i = 0 To Dic.Count - 1 ReDim Preserve Brr(K) Brr(K) = Application.Index(BomList, Dic.Items(i)) K = K + 1 Next Next Bom = Brr End Function