Hi, I'm newbie and I don't know what the problem is. Sometimes program can not open serial port. For example the code below, was working just fine for com9 yesterday, now it's not. It tries to run "MSComm1.PortOpen = True" the goes to error. Same error occurs for some other ports, time to time. Can you help me?



Private Sub cmdBasla_Click()
On Error GoTo hata
MSComm1.CommPort = Val(Replace(Combo1.Text, "Comm", ""))

If MSComm1.PortOpen = False Then MSComm1.PortOpen = True
cmdBasla.Enabled = False
Exit Sub
hata:
Call subLogEkle("cmdBasla_Click " & Err.Description)
End Sub