By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,473 Members | 1,278 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,473 IT Pros & Developers. It's quick & easy.

Length of a variant string

P: n/a
Hi

I am getting an array (as a variant) from split function as below;

Dim arr
arr = Split(srcStr, ",")

How do I find the number of elements in the array?

Thanks

Regards
Nov 13 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
John wrote:
Hi

I am getting an array (as a variant) from split function as below;

Dim arr
arr = Split(srcStr, ",")

How do I find the number of elements in the array?


UBound(arr)

If you want to loop through them use:

For i = lbound(arr) to ubound(arr)...

as you have no control as to where the array starts (it's generally zero
based)

--
This sig left intentionally blank
Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.