find the length of array? Somesh522524-Jan-2011 how i can find the length of Array in VB script? Give the soln of its vb scriptvb script Updated on 20-May-2011
Anonymous User
20-May-2011Hi.....
Use following code snippet to calculate length of array in vbscript
DimNewArray(10)
NewArray(0)="Apple"
MsgBox arrLength(NewArray)
Function arrLength(vArray)
ItemCount=0
ForItemIndex=0ToUBound(vArray)
IfNot(vArray(ItemIndex))=EmptyThen
ItemCount=ItemCount+1
EndIf
Next
arrLength =ItemCount
EndFunction