发布网友 发布时间:2022-04-24 07:52
共2个回答
热心网友 时间:2022-06-17 19:13
你要的代码来了,已经验证OK!!!
Private Sub Command1_Click()
Dim str1, str2 As String
Dim i As Integer
str1 = "ABCDEFG"
For i = 2 To Len(str1) Step 2
str2 = str2 & Mid(str1, i, 1)
Next
MsgBox str2
End Sub
Private Sub Command2_Click()
Dim str1, str2(1 To 7) As String
Dim i As Integer
str1 = "ABCDEFG"
For i = 1 To Len(str1)
str2(i) = Mid(str1, i, 1)
Next
For i = 2 To 7 Step 2
str2(i) = str2(i - 1)
Next
MsgBox Join(str2, "")
End Sub
以后共同学习!!!
热心网友 时间:2022-06-17 19:13
这个本来也不需要讲啊
要这个再拿到课堂上来讲 那就完了 都去初中学吧