| ??? 04/10/04 07:25 Read: times |
#68272 - Still not working~.......... Responding to: ???'s previous message |
What's wrong with this procedure?
------------------------------------------ Private Sub mscomm1_oncomm() Dim sdata() As Byte Dim re_data() As Byte Dim i As Integer If MSComm1.CommEvent = comevreveive Then sdata = MSComm1.Input End If re_data = sdata Cls For i = 0 To UBound(re_data) Print re_data(i) Next i End Sub ------------------------------------------ After running it, nothing happened. But when 51 sends back data to PC, it shows a error message, something like "runtime error'9'array exceeded the range?" The VB focus on the line "For i = 0 To UBound(re_data)" Stanley |
| Topic | Author | Date |
| 8051 -> mscomm1.input | 01/01/70 00:00 | |
| RE: 8051 -> mscomm1.input | 01/01/70 00:00 | |
| RE: 8051 -> mscomm1.input | 01/01/70 00:00 | |
| RE: 8051 -> mscomm1.input | 01/01/70 00:00 | |
| RE: 8051 -> mscomm1.input | 01/01/70 00:00 | |
| RE: 8051 -> mscomm1.input | 01/01/70 00:00 | |
| display wrong number | 01/01/70 00:00 | |
| RE: display wrong number | 01/01/70 00:00 | |
| RE: display wrong number | 01/01/70 00:00 | |
| RE: display wrong number | 01/01/70 00:00 | |
| so note for your vb | 01/01/70 00:00 | |
| Still not working~.......... | 01/01/70 00:00 | |
| RE: Still not working~.......... | 01/01/70 00:00 | |
| This line: | 01/01/70 00:00 | |
| RE: Still not working~.......... | 01/01/70 00:00 | |
| Okay~! but you email address is...? | 01/01/70 00:00 | |
my email | 01/01/70 00:00 | |
| RE: display wrong number | 01/01/70 00:00 | |
| RE: display wrong number | 01/01/70 00:00 | |
| RE: display wrong number | 01/01/70 00:00 | |
| RE: 8051 -> mscomm1.input | 01/01/70 00:00 | |
| RE: 8051 -> mscomm1.input | 01/01/70 00:00 | |
| Whole new one | 01/01/70 00:00 | |
| Cannot use on_comm | 01/01/70 00:00 |



