Option Explicit
Private Sub Command1_Click()
Dim strDemo As String
strDemo = Trim(Text1.Text)
If Len(strDemo) > 6 Or Len(strDemo) < 1 Then
MsgBox ("请输入6个数")
Else
Dim LeftString As String
Dim RightString As String
Dim t As String
Dim strArray(1 To 3) As String
LeftString = Left(strDemo, 3)
RightString = Right(strDemo, 3)
t = Left(LeftString, 1)
Mid(LeftString, 1, 1) = Mid(LeftString, 2, 1)
Mid(LeftString, 2, 1) = t
t = Left(RightString, 1)
Mid(RightString, 1, 1) = Mid(RightString, 2, 1)
Mid(RightString, 2, 1) = t
Text2.Text = RightString & LeftString
End If
End Sub