Question:
is there a way to know the length of an array in vbScript ?
luis s
2007-07-19 10:13:19 UTC
hi...
im working with vbScript and i want to know how to get the lenght of an array. is there any method or function
Three answers:
acitodg
2007-07-19 10:26:19 UTC
You can use the Ubound function to get the length of the array. You can check out this reference for more information on how the function works. http://www.w3schools.com/vbscript/func_ubound.asp



Dominic Acito

http://www.dominicacito.com
boredpenguin2
2007-07-19 17:19:15 UTC
You should know length because you created it, the length is equal to the number of "cells" or values you put in the array... BUT you simply use the following code:



VariableArrayName.length



and it'll give you an integer containing the number of "cells" (or values, you know how arrays work, right?) the array contains.
gja
2007-07-19 17:21:38 UTC
ya use the selectindex option ,with tis you can get the length of the array


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...