I have created a GUI and selected the listbox to list lots of countries.
I then need to know what country the user has selected. The text box should update accordingly. I have used this code:
ListBoxCheck = get(handles.listbox1,'String');if(ListBoxCheck == Afghanistan) set(handles.text3,'String','Working');elseif(ListBoxCheck == Argentina) set(handles.text3,'String','Working2');end
However, when I click on Argentina or Afghanistan I get this: Undefined function or variable 'Afghanistan'.
Error in VisaProcessor>listbox1_Callback (line 135) if(ListBoxCheck == Afghanistan)
Anyone know why or can help?
Thank.s
Best Answer