Close message box if user doesn't
Show older comments
I am trying to use a message box to let a user know that the program is running (this program will be deployed as a standalone executable) and I want to make sure if they click ok on the message box, it doesn't break things. Here is what I was trying:
handle = msgbox('Please wait...');
%Do stuff
if exist('handle', 'var')
delete(handle);
clear('handle');
end
The problem is, while I'm "%doing stuff", the msgbox won't go away while clicking ok but when the stuff is done, it does and it still enters the if loop and tries to delete 'handle' which isn't open any more but is still a listed variable.
Recommendations?
Accepted Answer
More Answers (0)
Categories
Find more on Graphics Object Programming in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!