pinieros
Board Regular
- Joined
- Dec 21, 2004
- Messages
- 59
Hi board!
I am using the following code in VB to test the com1 hardware.
The problem is that it works great in debug mode but noy in RUN mode
I am using a jumper on pins 2&3 of the com1
Private Sub Option1_Click()
If Option1.Value = True Then
If Label1.Caption = "Com1 OK" Then Label1.Caption = ""
If Label1.Caption = "Com2 OK" Then Label1.Caption = ""
If Label1.Caption = "Com3 OK" Then Label1.Caption = ""
If Label1.Caption = "Com4 OK" Then Label1.Caption = ""
MSComm1.CommPort = 1
MSComm1.PortOpen = True
MSComm1.Output = Chr(d)
If MSComm1.Input = Chr(d) Then
Label1.Caption = "Com1 OK"
Else: MsgBox "Error on COM1", vbCritical, "Caution"
Picture2.Visible = True
End If
End If
MSComm1.PortOpen = False
End Sub
I am using the following code in VB to test the com1 hardware.
The problem is that it works great in debug mode but noy in RUN mode
I am using a jumper on pins 2&3 of the com1
Private Sub Option1_Click()
If Option1.Value = True Then
If Label1.Caption = "Com1 OK" Then Label1.Caption = ""
If Label1.Caption = "Com2 OK" Then Label1.Caption = ""
If Label1.Caption = "Com3 OK" Then Label1.Caption = ""
If Label1.Caption = "Com4 OK" Then Label1.Caption = ""
MSComm1.CommPort = 1
MSComm1.PortOpen = True
MSComm1.Output = Chr(d)
If MSComm1.Input = Chr(d) Then
Label1.Caption = "Com1 OK"
Else: MsgBox "Error on COM1", vbCritical, "Caution"
Picture2.Visible = True
End If
End If
MSComm1.PortOpen = False
End Sub