Thread: Close File
View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Diane Pruneau Diane Pruneau is offline
external usenet poster
 
Posts: 1
Default Close File

If the file is the current file:
ActiveWorkbook.Close SaveChanges:=True (or False)

If not, make it active first:
Windows(filename).Activate

"MSHO" wrote:

How do I get an excel workbook to close using a macro?
I tried Application(filename).Quit but it didn't work.

Thanks

Mikayla