ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   macro that opens a number of workbooks and close them (https://www.excelbanter.com/excel-programming/339332-re-macro-opens-number-workbooks-close-them.html)

Alok

macro that opens a number of workbooks and close them
 
In the statement which closes the workbooks .. which should be like

Workbooks("......").Close

you just need to add
SaveChanges:=False

Alok

"Hoshyar" wrote:

I have 12 spread sheets (12 files). I have set up a macro that can open them
all and copy the needed info and paste them in one single spread sheet, and
then closes them all. when the marco closes the opened spread sheet, it
alwasy ask me whether I want to save the changes in the opened spread sheets.
I have to klick 12 times NO to this question. how can I avoid that. Note that
when the marco opens the spread sheets no changes will be made to them, hence
no need to save changes. is there any possible way to avoid this and close
the spread sheets without asking me to save changes? many thanks


Hoshyar

macro that opens a number of workbooks and close them
 
Hi Alok,

Many thanks. it worked.

Regards
Hoshyar

"Alok" wrote:

In the statement which closes the workbooks .. which should be like

Workbooks("......").Close

you just need to add
SaveChanges:=False

Alok

"Hoshyar" wrote:

I have 12 spread sheets (12 files). I have set up a macro that can open them
all and copy the needed info and paste them in one single spread sheet, and
then closes them all. when the marco closes the opened spread sheet, it
alwasy ask me whether I want to save the changes in the opened spread sheets.
I have to klick 12 times NO to this question. how can I avoid that. Note that
when the marco opens the spread sheets no changes will be made to them, hence
no need to save changes. is there any possible way to avoid this and close
the spread sheets without asking me to save changes? many thanks



All times are GMT +1. The time now is 09:00 PM.

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