It is not clear what you are trying to do, and there may be a better overall solution. For starters, you never assign values to any element of z, yet you are printing it out. So you are always going to print 0.
Note that LBound(t) will be 0, due to what Split returns. So the first value of w in your loop will be 0. If you are using "Option Base 1" at the top of the module, then the first dimension of z will be 1 To UBound(t) and you will get a subscript error.
I recommend you make your lower bounds explicit and try this:
but I can't say with 100% certainty because I don't know what this code is supposed to do.
(Also I highly recommend using variable names that are meaningful, rather than single letters.)
Bookmarks