none
Maximum length of String

    Question

  • Hi all,

    can someone tell what the maximum length a String variable in Office 2007/VBA is? 

    I run into the following problem. I read a file (approx. 1mln characters) and only about 500k character are read/put into the String variable.  Is this because of a maximum numbers of characters in a String object?

    Thanks!

    Roy
    Wednesday, September 17, 2008 11:07 AM

All replies

  • Hi,

    Help file says of a String variable,

    • A variable-length string can contain up to approximately 2 billion (2^31) characters.

    • A fixed-length string can contain 1 to approximately 64K (2^16) characters.

    Wednesday, September 17, 2008 11:39 AM