ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Stop "save changes" message appearing (https://www.excelbanter.com/excel-programming/355423-stop-save-changes-message-appearing.html)

DJ Dusty[_3_]

Stop "save changes" message appearing
 

During a macro, I close a workbook, but get the "do you want to save
changes" message appearing, even though I only opened said workbook
purely to copy some cells to another workbook. I didn't -make- any
changes!

It is crucial that the macro does not halt so that the "save changes"
message appears, so how do I stop it happening???

Thanks!


--
DJ Dusty
------------------------------------------------------------------------
DJ Dusty's Profile: http://www.excelforum.com/member.php...o&userid=16335
View this thread: http://www.excelforum.com/showthread...hreadid=520084


Chip Pearson

Stop "save changes" message appearing
 
Some functions like NOW will cause the workbook to calculate on
opening, and thus your workbook will be changed. To close the
workbook without saving changes, use


Workbooks("Whatever.xls").Close savechanges:=False


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com





"DJ Dusty"
wrote in
message
...

During a macro, I close a workbook, but get the "do you want to
save
changes" message appearing, even though I only opened said
workbook
purely to copy some cells to another workbook. I didn't -make-
any
changes!

It is crucial that the macro does not halt so that the "save
changes"
message appears, so how do I stop it happening???

Thanks!


--
DJ Dusty
------------------------------------------------------------------------
DJ Dusty's Profile:
http://www.excelforum.com/member.php...o&userid=16335
View this thread:
http://www.excelforum.com/showthread...hreadid=520084




DJ Dusty[_4_]

Stop "save changes" message appearing
 

Fantastic, that's solved it - you're a legend

--
DJ Dust
-----------------------------------------------------------------------
DJ Dusty's Profile: http://www.excelforum.com/member.php...fo&userid=1633
View this thread: http://www.excelforum.com/showthread.php?threadid=52008



All times are GMT +1. The time now is 06:19 AM.

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