is there a way to find out how many entry are in an array
Printable View
is there a way to find out how many entry are in an array
Heres an example for your last question:
Also, you can use Ubound(array) 'Not sure what I was thinkin'
[Edited by Lethal on 12-06-2000 at 12:07 AM]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
I need to see your code to help.
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
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.
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