Question Status

Verified
Kauto asked a question on 19 Feb 2015 12:54 PM

Hi All,

I've my code written and working fine for excel data import - however every example I see has the final line set to application.quit() - which is set to close the excel file.

My issue is that it doesn't close the excel application, it instead prompts for a save dialog, even though I have opened the file read only and made no changes to it.

Has anyone else seen this?

Reply
Verified Answer
Anton Venter responded on 19 Feb 2015 1:18 PM

Have a look at this article stackoverflow.com/.../closing-excel-application-using-vba

Reply
Verified Answer
Kauto responded on 19 Feb 2015 1:24 PM

Thanks Anton - yeah actually got round it by using;

workbook.close(false);

The false relating to save changes to the workbook.

Then call application.quit();

Sorted.

Cheers

Reply
Verified Answer
Anton Venter responded on 19 Feb 2015 1:18 PM

Have a look at this article stackoverflow.com/.../closing-excel-application-using-vba

Reply
Verified Answer
Kauto responded on 19 Feb 2015 1:24 PM

Thanks Anton - yeah actually got round it by using;

workbook.close(false);

The false relating to save changes to the workbook.

Then call application.quit();

Sorted.

Cheers

Reply