PC Review


Reply
Thread Tools Rate Thread

How to close file and hibernate?

 
 
Eric
Guest
Posts: n/a
 
      1st May 2010
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


 
Reply With Quote
 
 
 
 
Peter T
Guest
Posts: n/a
 
      1st May 2010
The Hibernate API looks what I suggested to you in a previous post.

I assume the code to call the hibernate is in the same file that you are
wanting to close. It's a bit confusing though, if that were the case not
sure why you are not doing simply

Thisworkbook.close True

If(?) my assumption is right, put the hibernate code in your Personal
together with another routing

' in personal
sub OnTimeHibernate()
application.ontime now, "Hibernate"
end sub

sub Hibernate
SetSuspendState 1, 1, 0
end sub

just before doing closing Thisworkbook do
Application.Run "Personal.xls!OnTimeHibernate" ' or .xlsm

If my assumption is wrong explain what you are doing to avoid guessing.

Regards,
Peter T


"Eric" <(E-Mail Removed)> wrote in message
news:1F80C027-F062-422B-A1EE-(E-Mail Removed)...
>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
>
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to close file and hibernate? Eric Microsoft Excel Misc 2 4th May 2010 07:44 PM
Version 6.0-close makes works close and not the file. =?Utf-8?B?TmV3Ymll?= Microsoft Word New Users 0 3rd Oct 2004 03:05 PM
Re: How do you enable the file, close option to close the whole appli. Cindy M -WordMVP- Microsoft Word Document Management 2 28th Sep 2004 01:35 PM
cannot create hibernate file, but hibernate tab is there! xav Windows XP General 1 25th Apr 2004 10:14 PM
Enable hibernate; PPM unable to reserve the hibernate file =?Utf-8?B?U3RldmU=?= Windows XP General 0 2nd Mar 2004 04:21 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:30 PM.