assuming each member of the array was to be summed ...
dim totalsize as long
thearray = split(thestring, whatever, whatever)
for x = lbound(thearray) to ubound(thearray)
totalsize = totalsize + val(thearray(x))
next
if the size was every second item, skip one ..
thearray = split(thestring, whatever, whatever)
for x = lbound(thearray) to ubound(thearray) step 2
totalsize = totalsize + val(thearray(x))
next
I really think storing the data in the tag value of anything is poor
programming practice. A better solution would be defining a local
user-defined type and using that for the data. Then save the index of the
respective user defined type as the tag.
private type myfiledata
filename as string
filesize as long
end type
(re)dim mfd (0 to numberoffiles) as myfiledata
mfd(0).filename = "whatever"
mfd(0).filesize = 12345
nod.Tag = 0
... then later ...
thearrayindex = val(nod.tag)
thefile = mfd(thearrayindex).filename
thesize = mfd(thearrayindex).filesize
... or in a loop ...
for x = lbound(mfd) to ubound(mfd)
totalsize = totalsize + mfd(0).filesize
next

Signature
Randy Birch
MVP Visual Basic
http://vbnet.mvps.org/
Please respond only to the newsgroups so all can benefit.
: Randy - I was going to try something like this but I know its wrong since U
: said I must include sum and Im not quite sure how to use the Val function.
[quoted text clipped - 10 lines]
:
: Yea I know its ugly.