OK, I've gone senile apparently --- I can't figure out how to get the number of elements in the array returned by the split function. Any help would be appreciated.
Printable View
OK, I've gone senile apparently --- I can't figure out how to get the number of elements in the array returned by the split function. Any help would be appreciated.
Use Ubound() or Lbound() to get the Upper and Lower bounds of the array. The lower bound is 0 with the split, so just use Ubound().
VB Code:
arr() = split(test.txt," ") msgbox ubound(arr) ' Actual elements are one less!
yeah, I AM going senile --- thanks