app menu with attributes

Hi, i have a variable global [v_module] and an app type menu,
i created an attribute called {MODULONAME} ,
in event onload i asign {MODULONAME} = ‘HELLO’;
and in event onexecute [v_module] = {MODULONAME};

But when i run a menu option i got an error: UNDEFINED VARIABLE {MODULONAME}

Which is the error?