View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
marco marco is offline
external usenet poster
 
Posts: 10
Default String concatenation having null character

Hi to all

I'm trying to concatenate a array of bytes (0-255) to a single string,
like this:

Private conteudoBytes(2000) As Byte
Private conteudoStr As String

When I try to do:

For i = 0 To 2000
conteudoStr = conteudoStr & Chr(conteudoBytes(i))
Next i

conteudoStr have the concatenated string to the first null character
(0x00), exclusively. I don't know why it stops there.
conteudoBytes(2000) have the contents of a binary file. Am i doing
this the wrong way?

Sincere regards and thank you in advance for reading,
Marco