Quote Originally Posted by merri
Can you post tMsgGeneral?

The bit of the above code doesn't really tell much anything as I don't know what msgTop is, I don't see btArr anywhere despite it is declared, I see btBuff that hasn't been declared and I don't see redimming (so that I could check if the buffer is of correct size or not).
Well, my bad, btBuff == btArr (in the actual code it's correct). Also, think of tmsgGeneral as something simple like:

vb Code:
  1. Type tMsgGeneral
  2.     type As Long
  3.     length as Long
  4.     number as Long
  5.     CRC as String * 16
  6. End Type