Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Array out of range! Fast plz :) 1

Status
Not open for further replies.

savok

Technical User
Jan 11, 2001
303
AT
How do i check if the array if out of range

In example

Test(1,1)

then i do msgbox(test(2,2))

it would say out of range
how do i do
if not out of range then
msgbox(test(2,2))
endif

thanks
 
see 'UBound Function' in help. Why ever don't you know how many elements there are. Arrays are the size you make them arent they?
 
My reply to your thread222-69679 may possibly clarify your Out of Bound situation! _________________________________
In theory, there is no difference between theory and practice. In practice, there is. [attributed to Yogi Berra]
 
John,

What if the lBound is NOT Zero? Shouldn'y you be using LBound?


MichaelRed
redmsp@erols.com

There is never time to do it right but there is always time to do it over
 
Yes, if I EVER used a low bound other than 0, which I don't. VB.NET is not going to allow it, but I "knew" five years that low bound was a holdover from early basic and had to disappear sometime.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top