Hi all,
I got an error massage on my following code
VB Code:
Private Sub Cmd_send_Click() For j = 0 To bytecount MSComm1.Output = char(j) Next End Sub
pointing to the third line.
can anybody explain me what is wrong?
thank you
Printable View
Hi all,
I got an error massage on my following code
VB Code:
Private Sub Cmd_send_Click() For j = 0 To bytecount MSComm1.Output = char(j) Next End Sub
pointing to the third line.
can anybody explain me what is wrong?
thank you
Which error do you get?
hi frans thank
this is the massage:
Run time error 380:
Invalid property value
see attachment
thanks
How is the char variable defined (what is the type)?
What is the value of j?
What is the value of char(j)?
the char variable:
dim char(255) as byte
value of j is byte
the value of Char(j) is byte
thanks Frans
I think you misunderstood my last two questions.
What is the value of j and char(j) at the moment you get the error.
j must be 0 or bigger. I ask this because I want to know if it goes wrong immediately, or that it goes wrong at a later stage.
char(j) should have a value between 0 and 255.
Dear Frans,
i think i have solve the problem.
i read the article on microsoft library.
it should be like this:
msscomm1.ouput = char
where char is an array variable.
this mean i have another thing to do,
because this code sends the whole data array.
is there any other way to send array byte data via mscomm partially and not the whole array of byte?
thank you