View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
bpeltzer bpeltzer is offline
external usenet poster
 
Posts: 180
Default VBA - Close without saving changes

ActiveWindow.Close savechanges:=False


"PaulW" wrote:

The system runs several reports each night, and I have a macro that opens the
report it needs automatically, uses the data, then closes the report.
Even in cases where all i've done is copy data from this report it asks me
occasionally if I want to save changes. Sometimes I do make changes.

Is there a way in a macro that I can set it to automatically close a file
without either saving it, or prompting me?
Any changes to these reports doesn't want to be saved so they can be used by
other people, and I generally like the prompt on a usual basis, but its one I
would rather be without while a macro is running.

Anything I can put before
ActiveWindow.Close
Or in it, or something like that?