VB 每2个数字后面1个空格
发布网友
发布时间:2024-10-23 12:52
我来回答
共3个回答
热心网友
时间:2024-10-27 20:29
Dim s As String
Dim bz As Integer
bz = 0
For i = 1 To Len(Me.Text1.Text)
If Asc(Mid(Me.Text1.Text, i, 1)) = Asc(vbCrLf) Then
bz = -1: s = s + Mid(Me.Text1.Text, i, 1)
Else
bz = bz + 1: s = s + Mid(Me.Text1.Text, i, 1)
If bz Mod 2 = 0 And bz > 0 Then s = s + " "
End If
Next
Me.Text1.Text = s
热心网友
时间:2024-10-27 20:30
FOR I=1 TO LEN STEP 2
OUTPUT MID ,I,2
OUTPUT " "
NEXT
热心网友
时间:2024-10-27 20:30
Dim s As String
Dim bz As Integer
bz = 0
For i = 1 To Len(Me.Text1.Text)
If Asc(Mid(Me.Text1.Text, i, 1)) = Asc(vbCrLf) Then
bz = -1: s = s + Mid(Me.Text1.Text
bz = bz + 1: s = s + Mid(Me.Text1.Text,If bz Mod 2 = 0 And bz > 0 Then s = s + " "End If