Thanks Kyle123

can you clarify a bit more about the use of functions over subs?

then thing is that the error message does not highlight anything -- just "out of memory" and the possibility to click ok.