|
▼Blue さん:
>ループ文とInStr,Midあたりで代用するんですかね。
>
>Sub test()
> Dim s() As String
>
> s = MySplit("ABC,DEF,,GHI", ",")
>End Sub
>
>Private Function MySplit(ByVal text As String, ByVal del As String) As String()
> Dim start As Long
> Dim pos As Long
> Dim count As Long
> Dim result() As String
>
> If del = "" Then Exit Function
>
> start = 1
> Do
> pos = InStr(start, text, del)
> If pos = 0 Then
> Exit Do
> End If
> ReDim Preserve result(count)
> result(count) = Mid$(text, start, pos - start)
> start = pos + 1
> count = count + 1
> Loop
> ReDim Preserve result(count)
> result(count) = Mid$(text, start)
>
> MySplit = result
>End Function
ありがとうございました!!
|
|