% % --------------------------------------------------------------------
function Bearbeiten_menu_Tabname_Callback(hObject, eventdata, handles)
% hObject handle to Bearbeiten_menu_Tabname (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
Gebaeudetyp2= inputdlg( 'Name der Gebäudegruppe' , 'Tabname ändern' );
set(handles.pushbutton22, 'String', Gebaeudetyp2{1} );
Gebaeudetyp2= get(handles.pushbutton22, 'String');
setappdata(0, 'Gebaeudetyp2', Gebaeudetyp2);
end
Gebaeudetyp2= getappdata(0, 'Gebaeudetyp2');
set(handles.pushbutton22, 'String', Gebaeudetyp2);
Finally, I found a solution and it works. Just in case someone else will have a similar problem, I am posting my solution.
I am using this getappdata- command in the opening function. Is it possible to delete the stored value?