1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Excel 2002 - VBA - Maximum charactors for a string

Discussion in 'Business Applications' started by Rae1234, Sep 8, 2004.

Thread Status:
Not open for further replies.
  1. Rae1234

    Rae1234 Thread Starter

    Apr 21, 2004
    Does anyone know what the maximum amount of characters for a string is for Excel 2002? I am receiving an error in my program on a record that contains a rather large string. Thanks
  2. Zack Barresse

    Zack Barresse

    Jul 25, 2004
    From the help files ...

    String Data Type
    There are two kinds of strings: variable-length and fixed-length strings. 
    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. 
    Note   A Public fixed-length string can't be used in a class module. 
    The codes for String characters range from 0–255. The first 128 characters (0–127) of the character set correspond to the letters and symbols on a standard U.S. keyboard. These first 128 characters are the same as those defined by the ASCII character set. The second 128 characters (128–255) represent special characters, such as letters in international alphabets, accents, currency symbols, and fractions. The type-declaration character for String is the dollar sign ($).
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/271627

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice