Hello,
I have a textbox where user enters either 0 or 1. If he enters 0 then i would like to send two byte as 0, 0 and if user enters 1 then i should send FF, 0. Now, i am trying in this way but it is not working in the case of when user enters 1.
Valuestr = Chr((CLng("0" & TextBox5.Text) And 65280) / 256) & Chr(CLng("0" & TextBox5.Text) And 255)
Please help me to how can i achieve this.
I have a textbox where user enters either 0 or 1. If he enters 0 then i would like to send two byte as 0, 0 and if user enters 1 then i should send FF, 0. Now, i am trying in this way but it is not working in the case of when user enters 1.
Valuestr = Chr((CLng("0" & TextBox5.Text) And 65280) / 256) & Chr(CLng("0" & TextBox5.Text) And 255)
Please help me to how can i achieve this.