I got Type Mismatch error using code similar to the following.

Dim Xbyte as Byte
Dim Xstring as String
Dim OneByte as String*1

Xbyte = Left(Xtring, 1)
Xbyte = OneByte


I thought that Strings were made up of Bytes, and that a Byte was equivalent to a string of length one. I understand that VB might require more than one byte of storage for a string of length one (due to control data for string), but was surprised at Type Mismatch error.

Apparently, I have been manipulating strings without understanding much about them.

Any explanations?