ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Closing Workbook without Questions (https://www.excelbanter.com/excel-programming/365284-closing-workbook-without-questions.html)

John Viall[_2_]

Closing Workbook without Questions
 
I have a spreadsheet macro running in Workbook 1, that opens Workbook 2,
manipulates some data, copies data from WB2 to WB1, and then closes WB2. How
do I get it to just close the workbook, without prompting me to save it with
changes?

Thanks,
John

excelent

Closing Workbook without Questions
 
as i recall some like:

ActiveWorkbook.Close savechanges:=True


Norman Jones

Closing Workbook without Questions
 
Hi John.

To close the workbook without saving any changes, try:

WB2.Close SaveChanges:= False

To close the workbook and save any changes, try:

WB2.Close SaveChanges:= True


---
Regards,
Norman



"John Viall" wrote in message
...
I have a spreadsheet macro running in Workbook 1, that opens Workbook 2,
manipulates some data, copies data from WB2 to WB1, and then closes WB2.
How
do I get it to just close the workbook, without prompting me to save it
with
changes?

Thanks,
John




John Viall[_2_]

Closing Workbook without Questions
 
Thanks, worked perfectly!

"Norman Jones" wrote:

Hi John.

To close the workbook without saving any changes, try:

WB2.Close SaveChanges:= False

To close the workbook and save any changes, try:

WB2.Close SaveChanges:= True


---
Regards,
Norman



"John Viall" wrote in message
...
I have a spreadsheet macro running in Workbook 1, that opens Workbook 2,
manipulates some data, copies data from WB2 to WB1, and then closes WB2.
How
do I get it to just close the workbook, without prompting me to save it
with
changes?

Thanks,
John






All times are GMT +1. The time now is 04:08 PM.

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