Save window problem

mg_reich

Board Regular
Joined
Jun 4, 2004
Messages
82
I have written a macro in a workbook that opens up different files and copies information and pastes it into a sheet in the current workbook. When the macro closes the files after it copies the data a "Do you want to save" message box pops up. The macro goes through several sheets so this window pops up 10+ times. It really doesn't matter if the files are saved at that time, b/c nothing has been done with them. I basically just don't want the save windows to pop up. I thought there might be something set differently with the properties of the file somewhere. Even if I just open one of the files and do nothing to it and close it again, I get the save message box.

Any ideas would be greatly appreciated.

Thanks in advance.
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
Your macro probably has a
Code:
.Close
command. You can type SaveChanges:=False on that line and you will not get the Save As dialog.

Code:
ActiveWindow.Close SaveChanges:=False
 
Upvote 0

Forum statistics

Threads
1,207,012
Messages
6,076,148
Members
446,187
Latest member
LMill

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top