+ Reply to Thread
Results 1 to 3 of 3

Need to adjust the length of data for accepted by input vba

  1. #1
    Registered User
    Join Date
    12-30-2012
    Location
    Nacogdoches, Tx
    MS-Off Ver
    Excel 2015
    Posts
    65

    Need to adjust the length of data for accepted by input vba

    I am entering records that have long account numbers.

    Please Login or Register  to view this content.
    When I enter the number that has 16 digits, I get an error message "overflow".

    I don't see where I can adjust the length of the allowed number.

  2. #2
    Valued Forum Contributor
    Join Date
    03-29-2013
    Location
    United Kingdom
    MS-Off Ver
    Office/Excel 2013
    Posts
    1,749

    Re: Need to adjust the length of data for accepted by input vba

    An account number (despite being numerical in appearance) is only used as an identification, maths is never performed on the acc no. so you can dimension your variable as a string which will take as many digits as you like.
    If you really want the numeric then dimension your variable as a double...
    Also - double check your applicationInputbox type ... I can't remember the numbers offhand but a type 2 may indicate an integer or a long which will restrict the number of digits it can handle.
    Elegant Simplicity............. Not Always

  3. #3
    Registered User
    Join Date
    12-30-2012
    Location
    Nacogdoches, Tx
    MS-Off Ver
    Excel 2015
    Posts
    65

    Red face Re: Need to adjust the length of data for accepted by input vba

    Thank You, that was helpful. I didn't consider using string, but that works just fine.

    Again, Thank You

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1