Thread: close excel
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Frank Kabel Frank Kabel is offline
external usenet poster
 
Posts: 3,885
Default close excel

Hi
not tested but try

sub workbook_beforeclose()
if workbooks.count=1 then
application.quit
end if
end sub


"Sunil" wrote:

is it possible for excel to close when then last workwook is closed. I would
like to do this with a macro in sub autoclose.