Option Explicit Public text_ As String Public allTEXT As String Public i As Integer Public j As Integer Public k As Integer Public s As String Public t1 As String Public t2 As String Private Sub Command1_Click() s = "" t1 = "" t2 = "" Text2.Text = "" allTEXT = Text1.Text For i = 1 To Len(allTEXT) e: s = Mid(Text1.Text, i, 1) t1 = t1 & s If s = " " Then For k = i + 1 To Len(allTEXT) s = Mid(Text1.Text, k, 1) t2 = t2 & s If s = " " Then Text2.Text = Text2.Text & t2 & t1 t2 = "" t1 = "" i = k + 1 GoTo e End If If k = Len(allTEXT) Then Text2.Text = Text2.Text & t2 & " " & t1 Exit Sub End If Next k End If Next i End Sub Private Sub Command2_Click() CommonDialog1.ShowOpen Open CommonDialog1.FileName For Input As #1 Do Until EOF(1) Input #1, text_ Text1.Text = Text1.Text & text_ & vbCrLf Loop Close #1 End Sub Private Sub Text1_Change() Text3.Text = Len(Text1.Text) End Sub