From: Maxx on
"Matt Fig" <spamanon(a)yahoo.com> wrote in message <i0d6rd$1vc$1(a)fred.mathworks.com>...
> You do not need to edit the property inspector. Somewhere in your code is the line that updates your cell array. Right after that line, use the SET function update the string.

Sorry Matt I do not follow. The part of my code is

% --- Executes on selection change in listbox1.
function listbox1_Callback(hObject, eventdata, handles)

%def_path=path(newpath,'\\Kiryu\public\ApplicationScience\Spectral Library\Documents')

[num,data_excel]=xlsread('Book2.xlsx','Sheet1','A2:D1000');
substance=data_excel(:,1);

I WANT THIS TO APPEAR IN THE LISTBOX UPON OPENING, NOT "Default text"

get(handles.figure1,'SelectionType');

if strcmp(get(handles.figure1,'SelectionType'),'open')
val=cellstr(get(handles.listbox1,'value'));
click1=get(handles.listbox1,'string');
set(handles.listbox1,'string',substance);
%list=click1{val};
set(handles.listbox1,'string',data_excel(val,:));
end

Thanks for your help
Maxx