當前位置:成語大全網 - 新華字典 - vb裏的split()函數說明

vb裏的split()函數說明

1. 函數解釋: 將壹個字符串按照某個子字符串分割成字符數組。

Function Split(Expression As String, [Delimiter], [Limit As Long = -1], [Compare As VbCompareMethod = vbBinaryCompare])

Member of VBA.Strings

Split a string into an array

2. 例子

Private Sub Command1_Click()

Dim x As String

x = "a b c"

Dim y

y = Split(x, " ")

For i = 0 To UBound(y)

Debug.Print y(i)

Next

End Sub