Wow, I see this seems to be one of those never ending discussions
. One of these days we'll have to put a stop to this.
Anyway not even your point 3 is respected.
You can do a simple test. Let's use the character that Jubinell posted, "��". This is a Unicode string with 1 only Unicode character. This is one of the Unicode characters defined with a surrogate pair, in this case the pair D840 DDA2.
Now copy this character to the cell A1
We have now in cell A1 a Unicode string with 1 character.
Let's test it (using the immediate window).
Test 1 - the length
?Len(Range("A1").Value)
2
Now you say that vba strings are Unicode strings and,
as you say in your point 3, Unicode characters may have 2 or more bytes. As you can see vba does not recognise it.
I say that vba strings are just sequences of 16bit codes. Since we have in this case 2 16bit codes we get the answer 2, it's OK
Test 2 - the code of the Unicode character
? Hex(AscW(Range("A1").Value))
D840
You say that vba strings are Unicode strings.
Where is the rest of the code of this character? As you can see vba does not recognise it.
I say that vba strings are just sequences of 16bit codes. Since we have in this case 2 16bit codes we get the code of the first one, as expected since when you use Asc or AscW with a string with several characters you get the code of the first one. It's OK.
Test 3 - Let's try Mid() to get a character that does not exist(?)
? Hex(AscW(Mid(Range("A1").Value, 2, 1)))
DDA2
You say that vba strings are Unicode strings.
How is it possible to use Mid to get the second Unicode character of a string that has only 1?
I say that vba strings are just sequences of 16bit codes. Since we have in this case 2 16bit codes we can use Mid to get the second 16bit code, and get it's value.
Test 4 - Let's try a test in the worksheet
In B1: =Len(A1) -> result: 2
Not even in the worksheet the string is recognised as being a Unicode string with 1 character.
My conclusion: a vba string is just a sequence of characters encoded with 16 bits.