+ Reply to Thread
Results 1 to 10 of 10

Msg error (overflow)

  1. #1
    Forum Contributor
    Join Date
    09-01-2011
    Location
    England
    MS-Off Ver
    Excel 365
    Posts
    126

    Msg error (overflow)

    hey,

    I don't know what's the cause of that error in the below code :

    Please Login or Register  to view this content.
    The error msg (overflow) in that part:

    Please Login or Register  to view this content.
    second; I have 16 columns should appear in listBox (lstTable), and i want 2 know If I have a column has a special format in sheet eg. (font:Wingdings 2), How can I format that column in listbox ???

    THX...

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,419

    Re: Msg error (overflow)

    How many rows of data do you have?

    variable nRow is an integer and can overflow if you have too many rows.
    Cheers
    Andy
    www.andypope.info

  3. #3
    Forum Contributor
    Join Date
    09-01-2011
    Location
    England
    MS-Off Ver
    Excel 365
    Posts
    126

    Re: Msg error (overflow)

    hey Andy


    I can't determine the no. of rows bcoz the range ot table is renewed and updated

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,419

    Re: Msg error (overflow)

    from the help.

    Integer variables are stored as 16-bit (2-byte) numbers ranging in value from -32,768 to 32,767

  5. #5
    Forum Contributor
    Join Date
    09-01-2011
    Location
    England
    MS-Off Ver
    Excel 365
    Posts
    126

    Re: Msg error (overflow)

    yea Andy, I changed the Integer variable to string, it works

    Now, how can I do that

    second; I have 16 columns should appear in listBox (lstTable), and i want 2 know If I have a column has a special format in sheet eg. (font:Wingdings 2), How can I format that column in listbox ???

  6. #6
    Valued Forum Contributor
    Join Date
    02-12-2011
    Location
    The Netherlands
    MS-Off Ver
    365
    Posts
    817

    Re: Msg error (overflow)

    Quote Originally Posted by Mamud View Post
    yea Andy, I changed the Integer variable to string, it works
    Please Login or Register  to view this content.
    Kind regards, Harry.

  7. #7
    Forum Contributor
    Join Date
    09-01-2011
    Location
    England
    MS-Off Ver
    Excel 365
    Posts
    126

    Re: Msg error (overflow)

    hi HSV

    I changed it, do u have any answers to my second question?

  8. #8
    Valued Forum Contributor
    Join Date
    02-12-2011
    Location
    The Netherlands
    MS-Off Ver
    365
    Posts
    817

    Re: Msg error (overflow)

    Mamud,

    Normal:
    Please Login or Register  to view this content.
    I’ve tried, but for one or two columns in the listbox would not succeed.
    Please Login or Register  to view this content.
    Sorry.

  9. #9
    Forum Contributor
    Join Date
    09-01-2011
    Location
    England
    MS-Off Ver
    Excel 365
    Posts
    126

    Re: Msg error (overflow)

    doesn't work

    any help

  10. #10
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Msg error (overflow)

    To my knowledge (<E2007) you can format a listbox (like Harry indicated), but you can't format a part of a listbox (row, column, header)

    BTW I'd prefer

    Please Login or Register  to view this content.
    If you omit Option Explicit the VBA compiler will do the dimensioning for you.
    Last edited by snb; 09-25-2011 at 11:11 AM.



+ 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