代码
Option Explicit
Dim i() As String
Dim j As Integer
'将字符串转换为数组
Private Sub Command1_Click()
ReDim i(Len(Text1.Text) - 1)
For j = 0 To Len(Text1.Text) - 1
i(j) = Mid(Text1.Text, j + 1, 1)
Next j
End Sub
'将数组转换为字符串
Private Sub Command2_Click()
Text2.Text = ""
For j = 0 To UBound(i)
Text2.Text = Text2.Text & i(j)
Next j
End Sub
PS:利用DoEvent语句可以防止死循环
已经有(0)位网友发表了评论,你也评一评吧!
原创文章如转载,请注明:转载自Eddy Blog
原文地址:http://www.rrgod.com/program/165.html 欢迎订阅Eddy Blog。