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?
Printable View
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?
I think it's a collection, try ControlArray.Count or similar.
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)
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
kedaman:
I stand corrected...guess I should have tested my brain failure first.
Thanks,
Hehe, shouldn't be hard
on error goto brain
brain.raise brainerror
exit brain
brain:
Msgbox brain.error
resume brain
end brain
'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]