I like what Joacim has done there. It's like watching Picasso paint: don't know what the hell is going on, but the way it all fits together is fascinating


Just as quick note, though. Remember that ASCII encoding is a 7 bit encoding, so any character defined by more than 7 bits will not be encoded properly (it will be encoded to a byte with value 0x3F by default). Your sysex string contains two such characters: Chr(&HF0) and Chr(&HF7).

On my system there are only three encodings that will encode the string to give the bytes as expected, and they are:
Windows-1252
iso-8859-1
iso-8859-15



You might want to change this line from Joacim's second block of code:
Code:
Dim bArr() As Byte = System.Text.Encoding.ASCII.GetBytes(msg)
to something along the lines of:
Code:
 Dim enc As System.Text.Encoding = System.Text.Encoding.GetEncoding("iso-8859-1")
 Dim bArr() As Byte = enc.GetBytes(msg)