closing active windows without saving changes

  • Thread starter Thread starter Tony
  • Start date Start date
T

Tony

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?
 
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

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
 

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