OK, after reading up I found that for this to work I would have to DIM the variable globally, which is bad UDF form (due to the potential to step on other main-script variables. So I cannot do what I want (properly). So it seems to me that the Function in this case should be part of the main script instead of a function...