Results 1 to 11 of 11

Thread: [RESOLVED] textbox array counting

Threaded View

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Aug 2005
    Posts
    606

    Resolved [RESOLVED] textbox array counting

    I have an array of 5 textboxes ie: text5(0)-text5(5)
    how do I count the index of each textbox in the array
    Or better yet what I want to do is check if the text box has any text in it and if it does, goto the the next textbox ect. I got the loop to work for this however when it counts a index of 6 I get error saying that there is no text5(6) witch there is'nt . I tried a if then with a message that said "no more boxs available" but I couldn't get out of the loop
    anyway here's what I got for the loop

    VB Code:
    1. Dim I As Integer
    2. Dim F As Boolean
    3.  
    4. Do Until F = True
    5. I = I + 1
    6. If I > 5 Then MsgBox ("No more boxs available")
    7. If Text6(I) = "" Then F = True
    8.  
    9. Loop
    I need to get out of the loop if the array index is >5
    some error handeling
    Last edited by crater; Nov 23rd, 2006 at 10:41 PM. Reason: spelling

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