Hi all
How to found the upper bound of the array without using the redim value
Check the code error in the command 2 click then how to solve this error without using the value of the text1.text


VB Code:
  1. Dim A() As Integer
  2. Private Sub Command1_Click()
  3. Dim I As Integer
  4. ReDim A(Val(Text1.Text))
  5. For I = 0 To Text1.Text
  6.     A(I) = I * 1
  7. Next
  8. End Sub
  9. Private Sub Command2_Click()
  10. 'Without Using the value of Text1.Text How we founnd the UpperBound Of Array A
  11. 'I Want
  12. For I = 0 To [B]A.ubound 'Error Here[/B] :confused:
  13.     MsgBox A(I)
  14. Next
  15. End Sub
Hope you all understand the problem I have a lot of array and I want to know the ubound value at run time without saving the other value
Thanks