Dec 12th, 2005, 02:14 AM
#1
Thread Starter
New Member
array of byte to Mscomm.out?
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
Dec 12th, 2005, 02:29 AM
#2
Re: array of byte to Mscomm.out?
Dec 12th, 2005, 03:07 AM
#3
Thread Starter
New Member
Re: array of byte to Mscomm.out?
hi frans thank
this is the massage:
Run time error 380:
Invalid property value
see attachment
thanks
Attached Images
Dec 12th, 2005, 03:25 AM
#4
Re: array of byte to Mscomm.out?
How is the char variable defined (what is the type)?
What is the value of j?
What is the value of char(j)?
Dec 12th, 2005, 03:32 AM
#5
Thread Starter
New Member
Re: array of byte to Mscomm.out?
the char variable:
dim char(255) as byte
value of j is byte
the value of Char(j) is byte
thanks Frans
Dec 12th, 2005, 03:38 AM
#6
Re: array of byte to Mscomm.out?
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.
Dec 12th, 2005, 04:17 AM
#7
Thread Starter
New Member
Re: array of byte to Mscomm.out?
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
Posting Permissions
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Rules
Click Here to Expand Forum to Full Width