I need to convert a simple string in a Byte array using excel VBA. Then this byte array is used as the request's body.
How can I do that?
Thanks.
I need to convert a simple string in a Byte array using excel VBA. Then this byte array is used as the request's body.
How can I do that?
Thanks.
Matthew answered how to convert to ANSI, but if you wanted the resulting byte array to still represent the original Unicode string, you'd simply assign it directly:
That's all there is to it. You end up with a 16-element Byte array, each successive pair describing one Unicode character.
If you only need ANSI characters, you can use the StrConv() function as is done here.