View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Bob I Bob I is offline
external usenet poster
 
Posts: 2,819
Default How to close file and hibernate?

Perhaps run a CMD file listing what should be done afer save changes is
complete containing

Kill EXCEL
Hibernate.

Eric wrote:

I would like to close existing file and go hibernate, but once this file is
closed, the command hibernate cannot be run. On the other way, I run the
hibernate, which work, but the file cannot be closed.
Does anyone have any suggestions on how to close file and hibernate XP?
My PC is XP with SP3 and using office 2003
Thanks in advance for any suggestions
Eric

Workbooks("Update Up.xls").Close savechanges:=True
hibernate

Public Sub hibernate()
'ShutDownHibernate
'Go into hibernate, force it, but don't disable wake events
SetSuspendState 1, 1, 0
End Sub