Problem receiving data in vb6 using MSComm

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • saintmenace
    New Member
    • Feb 2013
    • 1

    Problem receiving data in vb6 using MSComm

    Hi. im a newbie in vb6 i need to receive data using mscomm in vb 6...
    here is my code but it doesnt work,
    please help me...
    thanks in advance GODBLESS

    ---------------------------
    Code:
    Private Sub Form_Load()
    
        On Error Resume Next
    
        ' Fire Rx Event Every Two Bytes
        MSComm1.RThreshold = 2
        
        ' When Inputting Data, Input 2 Bytes at a time
          MSComm1.InputLen = 2
        
        ' 9600 Baud, No Parity, 8 Data Bits, 1 Stop Bit
        MSComm1.Settings = "9600,n,8,1"
        
        ' Make sure DTR line is low to prevent Stamp reset
        MSComm1.DTREnable = False
        
        ' Open COM21
        MSComm1.CommPort = 21
        MSComm1.PortOpen = True
    
    End Sub
    even that i declare that the portopen = true it appears that it is close...
    Last edited by Rabbit; Feb 25 '13, 07:10 PM. Reason: Please use code tags when posting code.
Working...