ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Sending text (https://www.excelbanter.com/excel-programming/300372-sending-text.html)

Sunny[_4_]

Sending text
 
Hi,

I wrote a small test program that would communicate VBA
with an external microprocessor via the serial port. I'm
using MSComm. This code works fine when I send it out in
this fashion:

MSComm.Output = "123456"

However, when I use a variable for the output, I get an
error stating it's an invalid property value:

Dim v as string
v = "123456"
MSComm.Output = v

How is this different than what I did previously? I don't
know what to do. I tried using Str(v), but that doesn't
work either. Help! Thanks.

No Name

Sending text
 
Sorry...I figured it out. Ignore the previous message.


-----Original Message-----
Hi,

I wrote a small test program that would communicate VBA
with an external microprocessor via the serial port. I'm
using MSComm. This code works fine when I send it out in
this fashion:

MSComm.Output = "123456"

However, when I use a variable for the output, I get an
error stating it's an invalid property value:

Dim v as string
v = "123456"
MSComm.Output = v

How is this different than what I did previously? I

don't
know what to do. I tried using Str(v), but that doesn't
work either. Help! Thanks.
.



All times are GMT +1. The time now is 03:00 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com