Results 1 to 6 of 6

Thread: Counting How many Things in array!!

  1. #1

    Thread Starter
    Hyperactive Member Tequila_worm's Avatar
    Join Date
    Jan 2002
    Location
    Canada
    Posts
    344

    Counting How many Things in array!!

    What i am trying to to is count how many things i have stored in an array.
    The problem is i cant use the Lbound to Ubound function because my index starts at 2000 to 2010.
    if i use that function, it will give me that i have 2008 what ever but that's not it. Is there anyway it can be done??? Any help is apreciated.



    Ed.

  2. #2
    VB Code:
    1. Msgbox UBound(SomeArray) - LBound(SomeArray)

  3. #3

    Thread Starter
    Hyperactive Member Tequila_worm's Avatar
    Join Date
    Jan 2002
    Location
    Canada
    Posts
    344
    Originally posted by filburt1
    VB Code:
    1. Msgbox UBound(SomeArray) - LBound(SomeArray)

    That wont work. Because my index starts at 2000 to 2010. and all the others are blanks. all i need is from 2000 to 2010.

    And i cant use this eather

    VB Code:
    1. For i = MyArray(2000) to MyArray(2010)

    Because sometimes the array wont be untill 2010. then it gives an error.


    Thx for your help though.

  4. #4
    I don't understand what you mean...do your indicies go from 2000 to 2010 but not every index is used?

  5. #5

    Thread Starter
    Hyperactive Member Tequila_worm's Avatar
    Join Date
    Jan 2002
    Location
    Canada
    Posts
    344
    Yeah basically what it is. Is the index is an Extension number. So
    The extension number can only be from 2000 to 2010. Its an
    assignment from school. So he gave us a tip to use the Extension
    Number as the index. If you wanna totaly see what i am trying to do. Follow this link.

    http://www.sheridanc.on.ca/~moskal/c...ssignment3.htm

  6. #6
    The picture isn't missing BuggyProgrammer's Avatar
    Join Date
    Oct 2000
    Location
    Vancouver, Canada
    Posts
    5,217
    you can just use 0 to 10, and then minus 2000 when you use the extension number. so if the extension number is 2005 then use
    Arr(2005 - 2000)
    Remember, if someone's post was not helpful, you can always rate their post negatively .

Posting Permissions

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



Click Here to Expand Forum to Full Width