Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Jody Mills   on Nov 30 In MS Office Category.

  
Question Answered By: Leon Evans   on Nov 30

Perhaps this is what you need. I put binary/hex bytes into a string
this way. Snipped from my code:

Cmd is a command consisting of all hex bytes that I send out the serial
port.
pref & suff are prefix and suffix for the communications protocol

=======================================
Public Cmd As String
Public pref As String
Public suff As String
...
radio_address = CStr("&H" & ActiveSheet.Range("RadioAddressCell").Value)
suff = Chr(&HFD)
pref = Chr(&HFE) & Chr(&HFE) & Chr(radio_address) & Chr(&HE0)
...
Cmd = pref & Chr(&H5) & freq$ & suff
...
Cmd = Chr(&H16) & Chr(&H47)

Share: 

 
 
Didn't find what you were looking for? Find more on How to Convert ByteArray To String Or get search suggestion and latest updates.


Tagged: