vb中事件的组合
现在有几个按钮的click事件,线点击按钮1,等按钮一执行完毕后,再按下按钮二,这样比较繁琐,能不能将这几个click按一定顺序组合在一起!Private Sub Command5_Click() ' zero before
Text2.Text = ""
Text3.Text = ""
Dim i As Integer
Dim d(1) As Byte
d(1) = &HD8
d(0) = &H93
MSComm1.Output = d
For i = 0 To 1000
Next
If MSComm1.Input = "摾" Then
Command6_Click
For i = 0 To 1000
Next
If Len(Text2.Text) > 2 Then
Command7_Click
End If
End If
End Sub
Private Sub Command6_Click() 'start
Dim e(1) As Byte
e(1) = &HD4
e(0) = &H93
MSComm1.Output = e
End Sub
Private Sub Command7_Click()
Text3.Text = Mid(Text2.Text, 39, 6)
End Sub