Re: MScomm controls
From: Chris A. Kusmierz (cakusmierz_at_adelphia.net)
Date: 10/11/04
- Next message: boki: "What is the execution "debug.print" command after compile?"
- Previous message: KI LEE: "RE: Excel Validation.Add"
- In reply to: Neil: "MScomm controls"
- Next in thread: Dick Grier: "Re: MScomm controls"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 11 Oct 2004 00:12:45 -0400
"Neil" <nkaufman@charter.net> wrote in message
news:10mh1egkd5cln34@corp.supernews.com...
> Does anybody know what the command is for clearing the receive buffer when
> using MScomm. What's the best way to sort out data similiar to the
> following string that's in the receive buffer?
>
> @@@ 1048 LB 000 CN 5678 ID
>
> The first 4 characters are junk. I only want to keep the "1048" and the
> "5678" sets. The rest I don't need.
>
> thanks
>
>
Dim Receive as String
Dim V1 as String, V2 as String
MSComm1.InputLen=0
' assuming you've sorted out how to wait for the whole data stream
Receive=MSComm1.Input
V1=Mid$(Receive,5,4)
V2=Mid$(Receive,20,4)
HTH
Chris A. Kusmierz
P.S. The first 3 bytes of the data stream are probably bit level status
flags. Check the documentation for the equipment transmitting the data, if
it matters to you.
- Next message: boki: "What is the execution "debug.print" command after compile?"
- Previous message: KI LEE: "RE: Excel Validation.Add"
- In reply to: Neil: "MScomm controls"
- Next in thread: Dick Grier: "Re: MScomm controls"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|