Dim x As Variant Dim y(2) As Byte Dim st As String Private Sub Form_Load() MSComm1.CommPort = 6 MSComm1.Settings = "9600,n,8,1" MSComm1.DTREnable = False MSComm1.RThreshold = 1 MSComm1.InputLen = 0 MSComm1.PortOpen = True Combo1.ListIndex = 0 Combo2.ListIndex = 0 End Sub Private Sub Command1_Click() y(0) = Val(Combo1.Text) y(1) = Val(Combo2.Text) End Sub Private Sub MSComm1_OnComm() x = y st = MSComm1.Input If st = "!" Then Do Until MSComm1.InBufferCount = 3 Loop st = MSComm1.Input If st = "ROV" Then MSComm1.Output = x End If End If End Sub