MATLAB: Findobj does not work

findobjguiMATLABtimer

When the gui main program is running, I use findobj('Name', 'Gui_Main_Program');
This command does not work in timer callback function. It neither work in Matlab command window.
I see everyone says do not use global variables, so I put data in gui_main_hObject.UserData.
Thank you.

Best Answer

Either there is no object with exactly that name, or else the handle of it is not visible.
What shows up for
get(findall('type', 'figure'), 'Name')