Results 1 to 7 of 7

Thread: textbox array

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Nov 1999
    Location
    Cincinnati, OH
    Posts
    66

    Question

    I am using a dynamic control array of textboxes, and when ever i make a call to Ubound, the compiler blows up and says "array expected". Does Ubound only work with regular datatypes, or am i doing something wrong?

  2. #2
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    I think it's a collection, try ControlArray.Count or similar.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  3. #3
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    To get the Ubound use the count property.

    Dim x as integer
    x = text1.count
    x = How many textboxes
    so the UBound would equal (x - 1)
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

  4. #4
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    HEsaidJoe, not really, if you have a control array with say index 1 and index 2, the count will still be 2.

    So there is a Ubound property to the control array for this, as the Lbound property.
    Code:
    Text1.LBound
    Text1.UBound
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  5. #5
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    kedaman:

    I stand corrected...guess I should have tested my brain failure first.

    Thanks,
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

  6. #6
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    Hehe, shouldn't be hard

    on error goto brain

    brain.raise brainerror

    exit brain
    brain:
    Msgbox brain.error
    resume brain
    end brain



    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  7. #7
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946
    'correction

    Code:
    :rolleyes:
    on error goto brain 
    
    If len(brain) = 0 then
       :eek:
       msgbox "No sign of life!"
       Kill The Brainless Wonder
       exit sub
    else
    :D
    brain.raise brainerror 
    
    exit brain 
    End If
    
    brain: 
    Msgbox brain.error 
    resume brain 
    end brain 
    ;)




    [Edited by HeSaidJoe on 08-22-2000 at 06:16 PM]
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

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