serialport1.datareceived --

If serialport1.bytestoread > 0 then

do my code

endif


? (If no bytes -- nothing would execute?)

I'll try it -- I don't know what happens when the serialport is disconnected (as in wire off) (then bytestoread = 0?)