Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default closing active windows without saving changes

Hi,
Im working with Excel 2003. This line is supposed to allow
me to close an active window without being asked to save
any changes:

ActiveWindow.Close SaveChanges:=wdDoNotSaveChange

It does not work. Any ideas on what does work?

Also, how can I prvent the message about saving the
clipboard from being displayed?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,758
Default closing active windows without saving changes

It looks like you're mixing excel and word.

If you want to close a workbook, you could use:

activeworkbook.close savechanges:=false

And
application.cutcopymode = false

should stop the clipboard message.

Tony wrote:

Hi,
Im working with Excel 2003. This line is supposed to allow
me to close an active window without being asked to save
any changes:

ActiveWindow.Close SaveChanges:=wdDoNotSaveChange

It does not work. Any ideas on what does work?

Also, how can I prvent the message about saving the
clipboard from being displayed?


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,089
Default closing active windows without saving changes

Tony

if, by closing the Active Window, you want to close the Active Workbook, try
something like:

Workbooks("BOOK1.XLS").Close SaveChanges:=False

Check the VBA Help.

Regards

Trevor


"Tony" wrote in message
...
Hi,
Im working with Excel 2003. This line is supposed to allow
me to close an active window without being asked to save
any changes:

ActiveWindow.Close SaveChanges:=wdDoNotSaveChange

It does not work. Any ideas on what does work?

Also, how can I prvent the message about saving the
clipboard from being displayed?



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
Saving and Closing erf Excel Worksheet Functions 3 June 18th 08 05:03 PM
closing file with multiple windows open gvanhoy3 Excel Worksheet Functions 1 November 15th 06 06:31 PM
Closing Windows Sameer Excel Discussion (Misc queries) 3 October 26th 06 10:48 AM
Prevent open excel windows from automatically closing. Prevent Automatic Closing Excel Discussion (Misc queries) 1 April 10th 06 10:27 PM
Need help for closing the active worksheet only under conditions Frank Petschke Excel Programming 1 March 2nd 04 09:46 AM


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

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

About Us

"It's about Microsoft Excel"