Quote:@bplus - "ReDim" is useless here, since it has not yet been initialized. - The output is interesting. I know how that happens, but was that intentional? I don't really understand what you're trying to show.
KP,
I was just trying to show an example of a function using a shared array of first 10 squares with 5 added to each square for a non trivial though totally made up example.
ReDim was not needed in this example, no, but who gives a flying fur ball?! ReDim is good habit to use for output arrays from Subs and Functions so they can change the dimensions if that is their function or routine to do. Why restrict to Static arrays when Dynamic ones are so much more flexible with upper and lower bounds?
b = b + ...