Closing Workbook without Questions

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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
 
Thanks, worked perfectly!

Norman Jones said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top