如何吧一个string转化为长度为1的string数组?
rt
[解决办法]
Private Sub Form_Load()
Dim s() As String * 1
Dim Str As String
Dim i As Long
Str = "a历史dfasdfasdfasdf "
ReDim s(Len(Str))
For i = 1 To Len(Str)
s(i - 1) = Mid(Str, i, 1)
Debug.Print s(i - 1)
Next
End Sub
[解决办法]
我的可以动态设定 数组元素个数
[解决办法]
Private Sub Command1_Click()
Dim str As String
Dim str1() As String * 1
Dim i As Integer
Dim l As Integer
str = "ABCDEFGHIJKL "
l = Len(str)
ReDim str1(l - 1) As String * 1
For i = 1 To l - 1
str1(i - 1) = Mid(str, i, 1)
Next
End Sub