Results 1 to 6 of 6

Thread: Array

  1. #1

    Thread Starter
    Addicted Member nota141's Avatar
    Join Date
    Feb 2000
    Location
    The place down there under everyone else.
    Posts
    224

    Exclamation

    is there a way to find out how many entry are in an array
    On Error wake up and try again ;-)
    ___________________________
    ICQ # 65392645
    email - [email protected]

    Visual Studio 6 ent with SP5 Running on XP with an AMD 1.2 ThunderBird with 512 MB RAM And a 120GB primary HDD (very sweet)

  2. #2
    PowerPoster Lethal's Avatar
    Join Date
    Oct 2000
    Location
    Ohio
    Posts
    2,496

    Talking

    Heres an example for your last question:
    Also, you can use Ubound(array) 'Not sure what I was thinkin'
    Code:
    Option Explicit
    
    Private Sub Command1_Click()
    Dim ArrayExample() As String
    
    Text1.Text = Test(ArrayExample())
    End Sub
    
    Private Function Test(x() As String) As String
    Dim i As String
    ReDim x(0 To 1)
    x(0) = "Test"
    x(1) = "..ing"
    i = x(0) & Space(1) & x(1)
    Test = i
    End Function
    [Edited by Lethal on 12-06-2000 at 12:07 AM]

  3. #3
    Frenzied Member
    Join Date
    Aug 2000
    Location
    Birmingham, AL
    Posts
    1,276

    I need to see your code to help.

  4. #4
    Fanatic Member
    Join Date
    Sep 1999
    Location
    Bethel, North Carolina, USA
    Posts
    987
    You can use UBound and LBound to check the dimensions of an array

    Code:
    dim Array1(2 to 20)
    
    Debug.Print LBound(Array1) ' returns 2
    Debug.Print UBound(Array1) 'returns 20
    {Insert random techno-babble here}

    {Insert quote from some long gone mofo here}

  5. #5

    Thread Starter
    Addicted Member nota141's Avatar
    Join Date
    Feb 2000
    Location
    The place down there under everyone else.
    Posts
    224

    cant

    the code is about 10 pages long and you need all of it to know what is going on but i will try to tell you

    i am reading data in from a text file and each line is being read into a array and it redim the array for each line. then it does the same thing with another file and now i want to compare the two to see if ann one line are the same but i need to know how many entrys are in the array.
    On Error wake up and try again ;-)
    ___________________________
    ICQ # 65392645
    email - [email protected]

    Visual Studio 6 ent with SP5 Running on XP with an AMD 1.2 ThunderBird with 512 MB RAM And a 120GB primary HDD (very sweet)

  6. #6

    Thread Starter
    Addicted Member nota141's Avatar
    Join Date
    Feb 2000
    Location
    The place down there under everyone else.
    Posts
    224

    Post help

    i need a way to do this because i am using a global interger to store the number at the moment. but is there a better way
    On Error wake up and try again ;-)
    ___________________________
    ICQ # 65392645
    email - [email protected]

    Visual Studio 6 ent with SP5 Running on XP with an AMD 1.2 ThunderBird with 512 MB RAM And a 120GB primary HDD (very sweet)

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