Function getText(ByVal strInput As String, ByVal strSperator As String, ByVal lngNum As Long) As String
Dim i As Long
Dim k As Long
Dim j As Long
Dim h As Long
For i = 1 To Len(strInput)
If Mid(strInput, i, 1) = strSperator Then
k = k + 1
If k = lngNum Then j = i
If k = lngNum + 1 Then
h = i
Exit For
End If
End If
Next
If j > 0 Then
getText = Mid(strInput, j + 1, h - j - 1)
Else
MsgBox "没有符合要求的字符串"
getText = ""
End If
End Function作者: tmtony 时间: 2017-5-5 17:19
不错作者: pyh512 时间: 2017-5-6 18:20
学习学习了作者: ynjxw 时间: 2017-5-8 08:27
学习了