ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   how to disable save prompt on closing excel file in automated mode (https://www.excelbanter.com/excel-discussion-misc-queries/34012-how-disable-save-prompt-closing-excel-file-automated-mode.html)

[email protected]

how to disable save prompt on closing excel file in automated mode
 
how to disable "Do you want to save the changes to <file name" manual prompt
everytime while closing excel files having macros (macro password not known),
while in automated task mode which is closing and opening files automatically.

Dave Peterson

If I want to close another workbook in VBA, I'd use something like:

workbooks("otherworkbook.xls").close savechanges:=false

(false means I want to discard those changes.)



wrote:

how to disable "Do you want to save the changes to <file name" manual prompt
everytime while closing excel files having macros (macro password not known),
while in automated task mode which is closing and opening files automatically.


--

Dave Peterson

[email protected]

Hello Dave,
Thanks for your reply. Pls. help me understand what u meant to say,

My problem is I have approx. 6000 excel files and these files go as input to
a software program which automatically picks data from these files by openng
and closing them on its own. But since these files contain macros so
everytime a self opened file is closing down it asks for a manual
intervention to save changes or not... which defies the whole purpose of
automation. Iam a very basic user of excel and so would like to know how can
I avert that prompt so that the whole process runs smoothly.

Thanks and regards,
Vipul Agarwal

"Dave Peterson" wrote:

If I want to close another workbook in VBA, I'd use something like:

workbooks("otherworkbook.xls").close savechanges:=false

(false means I want to discard those changes.)



wrote:

how to disable "Do you want to save the changes to <file name" manual prompt
everytime while closing excel files having macros (macro password not known),
while in automated task mode which is closing and opening files automatically.


--

Dave Peterson


Dave Peterson

I have no idea what language your automated routine is in. So I responded with
what I would do if I opened a workbook in Excel's VBA.

The savechanges:=false portion tells excel to close the workbook without
saving--even if changes have been made.



wrote:

Hello Dave,
Thanks for your reply. Pls. help me understand what u meant to say,

My problem is I have approx. 6000 excel files and these files go as input to
a software program which automatically picks data from these files by openng
and closing them on its own. But since these files contain macros so
everytime a self opened file is closing down it asks for a manual
intervention to save changes or not... which defies the whole purpose of
automation. Iam a very basic user of excel and so would like to know how can
I avert that prompt so that the whole process runs smoothly.

Thanks and regards,
Vipul Agarwal

"Dave Peterson" wrote:

If I want to close another workbook in VBA, I'd use something like:

workbooks("otherworkbook.xls").close savechanges:=false

(false means I want to discard those changes.)



wrote:

how to disable "Do you want to save the changes to <file name" manual prompt
everytime while closing excel files having macros (macro password not known),
while in automated task mode which is closing and opening files automatically.


--

Dave Peterson


--

Dave Peterson


All times are GMT +1. The time now is 12:15 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com