VB 每2个数字后面1个空格
对象:1个text1文本1个Command1按钮text1内容是12345678912345678912345678912345678912345678912345678...
对象:1个text1文本 1个Command1按钮
text1内容是
123456789123456789123456789
123456789123456789123456789
123456789123456789123456789
按下Command1按钮后
text1内容为
12 34 56 78 91 23 45 67 89 12 34 56 78 9
12 34 56 78 91 23 45 67 89 12 34 56 78 9
12 34 56 78 91 23 45 67 89 12 34 56 78 9
请问这样代码该怎么些~
分不多,真心学习! 展开
text1内容是
123456789123456789123456789
123456789123456789123456789
123456789123456789123456789
按下Command1按钮后
text1内容为
12 34 56 78 91 23 45 67 89 12 34 56 78 9
12 34 56 78 91 23 45 67 89 12 34 56 78 9
12 34 56 78 91 23 45 67 89 12 34 56 78 9
请问这样代码该怎么些~
分不多,真心学习! 展开
3个回答
展开全部
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
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
展开全部
FOR I=1 TO LEN STEP 2
OUTPUT MID ,I,2
OUTPUT " "
NEXT
OUTPUT MID ,I,2
OUTPUT " "
NEXT
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
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
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
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询