on error createvariable(sys(2018)) =CreateVariable(Var2) ?Var2 function createvariable lparameters tcName lcPublic = 'PUBLIC ' + tcName &lcPublic endfuncthe problem is it has to be declared public, otherwise it goes out of scope right away. In any case, ALL good code should have the variables declared somewhere, IMO.