Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 695
Default Closing Workbook without Questions

as i recall some like:

ActiveWorkbook.Close savechanges:=True

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default 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



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default 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




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Answers to questions posing more questions in a workbook sbelle1 Excel Worksheet Functions 2 August 8th 09 01:02 AM
closing a workbook oercim Excel Programming 0 March 24th 06 01:27 PM
Closing Hidden Workbook when Active Workbook is Closed SusanK521 Excel Programming 5 September 24th 05 12:27 AM
Help with closing down a workbook?? Don Excel Worksheet Functions 1 May 9th 05 04:05 AM
closing excel after closing a workbook CWalsh[_2_] Excel Programming 3 January 21st 04 03:33 PM


All times are GMT +1. The time now is 11:05 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"