Function 词组(str0 As String, str1 As String) As Variant
Dim Text() As String, j As Integer
Dim char As String
Dim i As Integer, n As Integer
Dim substr0 As String, substr1 As String
substr0 = str0 & "#": substr1 = str1
j = 0: n = 1: char = ""
ReDim Preserve Text(j)
For i = 1 To Len(substr0) + 1
char = Mid(substr0, 1, n)
If InStr(substr1, char) > 0 Then
n = n + 1
Else
If Len(char) > 1 Then
Text(j) = Mid(substr0, 1, n - 1)
substr0 = "$" & Replace(substr0, Text(j), "", 1, 1)
substr1 = Replace(substr1, Text(j), "", 1, 1)
j = j + 1: n = 1: char = ""
ReDim Preserve Text(j)
End If
substr0 = Replace(substr0, Mid(substr0, 1, 1), "", 1, 1)
End If
Next
词组 = Text()
End Function
老师,你写的这段代码,我不是太看得懂, 你能帮我解释下,帮我讲讲吗?? 谢谢,一个崇拜你的 access 爱好者加初学者