Cancel the beep and an error msg in GUI button cancellation
1 view (last 30 days)
Show older comments
I created a save2XLS button in GUI that contain the following code:
[filename,pathname]= uiputfile('*.xls','Save as');
column=get(handles.foTable,'columnname')' ;
dataX=get(handles.foTable,'data');
num=[column;dataX];
fullFileName = [pathname filename]
if exist(fullFileName)
%overwrite the file
delete([pathname filename])
xlswrite([pathname filename],num);
else
%write new file
xlswrite([pathname filename],num);
end
If I decide to cancel the "save as" operation by clicking the X or the cancel button I get a beep and an error in the command window. How can I cancel it?
Thanks
0 Comments
Accepted Answer
More Answers (0)
See Also
Categories
Find more on Environment and Settings 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!