ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   auto no save (https://www.excelbanter.com/excel-programming/306996-auto-no-save.html)

choice[_2_]

auto no save
 
how would i go about having a code that closes the worksheet, and does NOT
save it

Frank Kabel

auto no save
 
Hi
one way:
ThisWorkbook.Saved = True
ThisWorkbook.Close


--
Regards
Frank Kabel
Frankfurt, Germany

"choice" schrieb im Newsbeitrag
...
how would i go about having a code that closes the worksheet, and

does NOT
save it



Dave Peterson[_3_]

auto no save
 
Another way to close a workbook without saving:

dim wkbk as workbook
set wkbk = workbooks("whatever.xls")
'....

wkbk.close savechanges:=false



choice wrote:

how would i go about having a code that closes the worksheet, and does NOT
save it


--

Dave Peterson



All times are GMT +1. The time now is 07:59 AM.

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