再求VB高手,4个text文本框,2个命令按钮,在text1中输入数字22,3547,36那...

2020-08-23 社会 81阅读
Private Sub Text1_Change()
Dim i As Integer, j As Integer
Dim zf As String, zz As String

zz = Trim(Text1.Text)
j = 1
Do Until zz = ""
i = InStr(zz, ",")
If i = 0 Then
zf = zz
zz = ""
Else
zf = Mid(zz, 1, i - 1)
zz = Mid(zz, i + 1)
End If

'用控件数组最好
Select Case j
Case 1
Text2.Text = zf
Case 2
Text3.Text = zf
Case 3
Text4.Text = zf
Case Else
Exit Do
End Select
j = j + 1
Loop
End Sub
声明:你问我答网所有作品(图文、音视频)均由用户自行上传分享,仅供网友学习交流。若您的权利被侵害,请联系fangmu6661024@163.com