Private Sub Command4_Click()
Dim a() As String
Dim i As Integer
Dim strTemp As String
a = Split(Text0.Value, vbCrLf)
For i = LBound(a) To UBound(a)
strTemp = strTemp & i & "、" & a(i) & " "
Next
Text2.Value = strTemp
End Sub
Private Sub Command4_Click()
Dim a() As String
Dim i As Integer
Dim strTemp As String ...
hjb016 发表于 2010-9-14 09:21
要不给他做个实例算了:
Private Sub Command4_Click()
Dim i As Long
If IsNull(Me.Text0.Value) = True Then Exit Sub
Me.Text2.Value = "1." & Me.Text0.Value
i = 1
Do While True
i = i + 1
Me.Text2.Value = Replace(Me.Text2.Value, Chr(10), i & ".", , 1)
If InStr(Me.Text2.Value, Chr(10)) = 0 Then Exit Do
Loop
End Sub