Array size

Hello Everyone…I’m try to find out a size of an array in LS, but I cannot find out how.

when using

x = ubound(arrayname, 1) (multi dimension)

I get a value that doesn’t reflect the true size…

actual size is 684, but when I do above… ubound returns… 5?

can anyone help please?

Subject: Works for me…

Dim arrayname(1 To 684, 1 To 5, 1 To 3) As Integer Msgbox Ubound(arrayname, 1)

correctly returns 684. Post the rest of your code and somebody may be able to help identify the problem.

Subject: It’s ok

Looks like you have to set Option base 1 to make Ubound work as expected. You can find more details in help.

Subject: found it

I figured out the 5 is the actual column count.when using

x = ubound( arrayname, 2)

it returned the actual row counts (hence the size)…

Thank you for your time everyone

~Brett