View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Alan Howells Alan Howells is offline
external usenet poster
 
Posts: 9
Default Close Excel file without prompting user to save

You can use
ThisWorkbook.Close SaveChanges:=False
or
Workbooks("File1").Close SaveChanges:=False

"JDay01" wrote in message
...
I am a self-taught user of VB for Excel and I've come along pretty well,

but
I'm getting stuck on something that seems like it should be fairly simple

to
do. I have two files: File1 contains a macro that performs various
functions on File2. When the File1 macro is finished, I want File1 to

close
automatically WITHOUT prompting the user if they wish to save (this file
should never be saved by the user). What can I do to force Excel to

close
the file without an option to save?