I pass a value from a macro by storing the value needed to the $ {MACRO_RESULT} variable. This is returned and because of this available after finishing the macro. I'm not sure that it works in the way you are looking for but it works for me. Erik de Wild Tripple-o