5、运行下面的程序,当单击窗体时,文本框 Text1 中的内容是,文本框 Text2 中的内容是。
Private Sub Form_Click()
Dim St As String
Dim St1 As String, St2 As String
St = "ASFRSD"
Call Change_String(St, St1, St2)
Text1.Text = St1
Text2.Text = St2
End Sub
Private Sub Change_String(S As String, St1 As String, St2 As String)
Dim tem As String, i As Integer
For i = 1 To Len(S)
tem = Mid(S, i, 1)
If tem = "S" Then
St1 = St1
St2 = St2 & "at"
ElseIf tem = "R" Then
St1 = St1 & "T"
Exit For
Else
St1 = St1 & tem
St2 = St2 & tem
End If
Next i
End Sub