469,626 Members | 886 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,626 developers. It's quick & easy.

using excel before windows shutdown

Hi,
i am trying to save some data in a excel spreadsheet, whenever the programm
shuts down.
Mostly this happens when a user is logging off or shuts the computer down.
im am using the
Private Sub Form1_Closing(ByVal sender As Object, ByVal e As
System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
to save the data before the shutdown.
The problem is that i can't open excel. Windows is prompting that it can't
close my programm. And i am getting
some error messages like error code 800800005. Which is leading me to am MS
Website but that's not solving
my problem. Is there a chance to open excel somehow while windows is
shutting down, or do i have to save my data
in a different way?

thanks in advance
chris knievel
Aug 4 '06 #1
3 2122
I would save your data quickly to text, and then next time app starts
up read this into excel?
Chris Knievel wrote:
Hi,
i am trying to save some data in a excel spreadsheet, whenever the programm
shuts down.
Mostly this happens when a user is logging off or shuts the computer down.
im am using the
Private Sub Form1_Closing(ByVal sender As Object, ByVal e As
System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
to save the data before the shutdown.
The problem is that i can't open excel. Windows is prompting that it can't
close my programm. And i am getting
some error messages like error code 800800005. Which is leading me to am MS
Website but that's not solving
my problem. Is there a chance to open excel somehow while windows is
shutting down, or do i have to save my data
in a different way?

thanks in advance
chris knievel
Aug 4 '06 #2
Hello dermot,

I would subclass the window procedure and trap the request to shutdown/restart
message. Return whatever value is required to abort the shutdown. Do your
dealio with excel, then initiate a second shutdown request prgrammatically.

-Boo
I would save your data quickly to text, and then next time app starts
up read this into excel?
Chris Knievel wrote:
>Hi,
i am trying to save some data in a excel spreadsheet, whenever the
programm
shuts down.
Mostly this happens when a user is logging off or shuts the computer
down.
im am using the
Private Sub Form1_Closing(ByVal sender As Object, ByVal e As
System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
to save the data before the shutdown.
The problem is that i can't open excel. Windows is prompting that it
can't
close my programm. And i am getting
some error messages like error code 800800005. Which is leading me to
am MS
Website but that's not solving
my problem. Is there a chance to open excel somehow while windows is
shutting down, or do i have to save my data
in a different way?
thanks in advance
chris knievel

Aug 5 '06 #3
Hello,
thanks for your answers.
I am trying it with subclassing. And it's working so thanks a lot. But
is there a way to get the information wether the user is logging off or
shutting the computer down?
I know about WM_CLOSE, but i think it only tells me that the user is
shutting down, logging off or restarting. I would like to know what
exactly he is doing, so that i can continue his command after i've
saved my data in excel.

cheers
chris

GhostInAK schrieb:
Hello dermot,

I would subclass the window procedure and trap the request to shutdown/restart
message. Return whatever value is required to abort the shutdown. Do your
dealio with excel, then initiate a second shutdown request prgrammatically.

-Boo
I would save your data quickly to text, and then next time app starts
up read this into excel?
Chris Knievel wrote:
Hi,
i am trying to save some data in a excel spreadsheet, whenever the
programm
shuts down.
Mostly this happens when a user is logging off or shuts the computer
down.
im am using the
Private Sub Form1_Closing(ByVal sender As Object, ByVal e As
System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
to save the data before the shutdown.
The problem is that i can't open excel. Windows is prompting that it
can't
close my programm. And i am getting
some error messages like error code 800800005. Which is leading me to
am MS
Website but that's not solving
my problem. Is there a chance to open excel somehow while windows is
shutting down, or do i have to save my data
in a different way?
thanks in advance
chris knievel
Aug 11 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Austin | last post: by
3 posts views Thread by IdleBrain | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.