MATLAB: How to open one GUI from Another using a Pop-up menu

sub-gui from main gui

So I have a main GUI that I want to open up sub-GUIs.
On the main GUI I have 2 push buttons (Car and Boat) next to each other. Beneath them I have a Pop-up menu (one for each push button).
What I desire is once the user selects either the Car or Boat push buttons the relative Pop-up menu will activate with the different sub-GUIs (and their file paths).
The sub-GUI list will be the type of Car or Boat, which once selected the sub-GUI will open and the user has to put in the different data for depreciation, insurance costings etc.
I don't want to have to "poll" each sub-GUI if at all possible.

Best Answer

Why do you want the second GUI name in a popup menu if you want to active it immediately upon pushing the button? Anyway, you simple set the popup index in the callbacks. Let's say the string property for the popup was set in GUIDE with the strings 'CarGUI.m' and 'BoatGUI.m'. So then in the car button callback
% Set popup to index 1
set(handles.popup, 'Value', 1);
% Now launch the CarGUI function
CarGUI
And in the callback for the boat, you'd do
% Set popup to index 2
set(handles.popup, 'Value', 2);
% Now launch the BoatGUI function
BoatGUI
Related Question