LZ的第一个和最后一个是“,”,所以str(0)和倒数第1个是empty……不用放到OutStr
快上课了……
Private Sub Command1_Click()
Dim Str() As String, OutStr As String, i As Integer
Str() = Split(Text1.Text, ",")
For i = 0 To UBound(Str)
OutStr = OutStr & Str(i) & Space(3 - Len(Str(i))) & ","
Next i
Text2.Text = OutStr
End Sub
借鉴的slore
我试了下可以