|
|
|
Click here to copy the following block |
Function SplitTbl(Text As String, Optional DelimiterTbl As String = " ") As _ String() Dim index As Long, startIndex As Long Dim itemCount As Long ReDim result(10) As String For index = 1 To Len(Text) If InStr(DelimiterTbl, Mid$(Text, index, 1)) Then If startIndex Then If itemCount > UBound(result) Then ReDim Preserve result(itemCount + 10) As String End If result(itemCount) = Mid$(Text, startIndex, index - startIndex) itemCount = itemCount + 1 startIndex = 0 End If Else If startIndex = 0 Then startIndex = index End If End If Next If startIndex Then If itemCount > UBound(result) Then ReDim Preserve result(itemCount + 10) As String End If result(itemCount) = Mid$(Text, startIndex, index - startIndex) itemCount = itemCount + 1 End If
If itemCount > 0 Then ReDim Preserve result(itemCount - 1) As String SplitTbl = result() Else SplitTbl = Split("") End If
End Function |
|
|
|
Submitted By :
Nayan Patel
(Member Since : 5/26/2004 12:23:06 PM)
|
|
|
Job Description :
He is the moderator of this site and currently working as an independent consultant. He works with VB.net/ASP.net, SQL Server and other MS technologies. He is MCSD.net, MCDBA and MCSE. In his free time he likes to watch funny movies and doing oil painting. |
View all (893) submissions by this author
(Birth Date : 7/14/1981 ) |
|
|