7,763
社区成员
发帖
与我相关
我的任务
分享
Private Sub Command1_Click()
Dim s
Dim a As Object
For Each a In Me.Controls
If TypeOf a Is TextBox Then
s = Mid(a.Name, 5, Len(a.Name) - 4)
a.Text = s
End If
Next
End Sub
Private Sub Command2_Click()
Dim s
Dim a As Object
iStr = "dsa dsf gfg gfd rer dfd fdsf dfsf erer fsdfd "
s = Split(iStr, " ")
For Each a In Me.Controls
If TypeOf a Is TextBox Then
L = Mid(a.Name, 5, Len(a.Name) - 4)
a.Text = s(L - 1)
End If
Next
End Sub
'添加 text1数组 text(0)到text(9)
Private Sub Command1_Click()
Dim str As String
Dim arr() As String
Dim i As Long
str = "1 5 6 8 9 a d AD" 'text 个数要和字符串数一样
arr = Split(str, " ")
For i = 0 To UBound(arr)
Text1(i) = arr(i)
Next i
End Sub
dim strTmp() as string
aa="dsf dfg gfg "
strTmp = Split(strLine, " ")
text1.text=strTmp(0)
text2.text=strTmp(1)
text3.text=strTmp(2)