|
-
Dec 5th, 2000, 11:53 PM
#1
Thread Starter
Addicted Member
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)
-
Dec 5th, 2000, 11:58 PM
#2
PowerPoster
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]
-
Dec 6th, 2000, 12:02 AM
#3
Frenzied Member
I need to see your code to help.
-
Dec 6th, 2000, 12:03 AM
#4
Fanatic Member
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}
-
Dec 6th, 2000, 12:20 AM
#5
Thread Starter
Addicted Member
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)
-
Dec 7th, 2000, 12:17 AM
#6
Thread Starter
Addicted Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|