Private Function split_vb5(ByVal sstr As String, spstr As String) As VariantDim starstr, lenstr, cur As IntegerDim backstr() As Stringstarstr = InStr(sstr, spstr)cur = starstr + 1lenstr = Len(sstr)ReDim backstr(0)backstr(0) = Left(sstr, starstr - 1)For x = starstr + 1 To lenstr If Mid(sstr, x, 1) = spstr Then ReDim Preserve backstr(UBound(backstr) + 1) backstr(UBound(backstr)) = Mid(sstr, cur, x - cur) cur = x + 1 Debug.Print backstr(UBound(backstr)) End IfNextsplit_vb5 = backstr()End Function...[ 查看全文 ]