Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Excel cant close without saving

Former Member
0 Likes
306

Hello all,

I am using an Excel macro to execute a special calculus. So Iu2019m creating an Excel and a macro and executing it to get the return value.

The problem is when I finish the program I free all objects by:

CALL METHOD OF h_excel 'QUIT'.

FREE OBJECT book_font.

FREE OBJECT p_val.

FREE OBJECT cell.

FREE OBJECT this_workbook.

FREE OBJECT workbooks.

FREE OBJECT newmodule.

FREE OBJECT module.

FREE OBJECT h_excel. "free up memory

and I get a pop up asking if I want to save the Excel Iu2019ve created.

I added this lines to deactivate the macro, and I stopped having the pop up but I still have an Excel process on the task manager

CALL METHOD OF newmodule 'Desactivate'.

CALL METHOD OF module 'Desactivate'.

Am I missing something?

Thanks in advance,

Best Regards

1 REPLY 1
Read only

Former Member
0 Likes
269

Problem solved.

I had to set the Excel property DisplayAlerts = 0.