XP Inactivity Logout

G

Guest

This is a re-post and hopefully with one of the replies I got the last time I can say this a little clearer and hopefully someone may know a solution to my problem

I have a program in excel that I wrote that takes between 25 and 45 minutes to run (automates process and data collection and creating reports, hundreds of files). I use windows XP and at work, I have the problem of the screen saver kicking on part way through and it creates a problem for some of my code. Harold Staff explained it best in his reply "Some network policies re-enables the screensaver automatically at certain intervals to ensure that all workstations are password protected after some time of "inactivity" -unfortunately defined only as mouse/keyboard activity." This is the exact situation I am in. Is there any way to disable this from VBA, I have tried several codes for disabling the screensaver but non of them seem to work. My other thought is to do something to make the computer stay active, and insert it into the code I have (22 modules and over 300 pages). I could really use some help and guidance on this. Is this even possible to do, prevent the "inactivity lock-out"

Running Windows XP and Excel 200

What can I do ??

Thanks for you time with this issu

Ti
 
T

Tom Ogilvy

What have you tried. did you try Ivan's code?
--
Regards,
Tom Ogilvy




Timmothy Gransbury said:
This is a re-post and hopefully with one of the replies I got the last
time I can say this a little clearer and hopefully someone may know a
solution to my problem.
I have a program in excel that I wrote that takes between 25 and 45
minutes to run (automates process and data collection and creating reports,
hundreds of files). I use windows XP and at work, I have the problem of the
screen saver kicking on part way through and it creates a problem for some
of my code. Harold Staff explained it best in his reply "Some network
policies re-enables the screensaver automatically at certain intervals to
ensure that all workstations are password protected after some time of
"inactivity" -unfortunately defined only as mouse/keyboard activity." This
is the exact situation I am in. Is there any way to disable this from VBA,
I have tried several codes for disabling the screensaver but non of them
seem to work. My other thought is to do something to make the computer stay
active, and insert it into the code I have (22 modules and over 300 pages).
I could really use some help and guidance on this. Is this even possible to
do, prevent the "inactivity lock-out".
 
G

Guest

I tried the code that Ivan had given and it doesn't seem to work, I have also tried the following code, and it doesn't seem to do the trick

Public Declare Function SystemParametersInfo Lib "user32" Alias "SystemParametersInfoA"
(ByVal uAction As Long, ByVal uParam As Long, ByVal lpvParam As Any, ByVal fuWinIni As Long) As Lon

Sub DisableScreenSaver(
Dim rtn As Lon
' Disable screensave
rtn = SystemParametersInfo(SPI_SETSCREENSAVEACTIVE, False, ByVal 0&, 0
End Su

Sub EnableScreenSaver(
Dim rtn As Lon
'Enable screensave
rtn = SystemParametersInfo(SPI_SETSCREENSAVEACTIVE, True, ByVal 0&, 0

End Su

If you have any other ideas it would be greatly appreciated. I have also seen the suggestion of using something called "Send Keys", but I would need guidance on that

Thank

Ti


----- Tom Ogilvy wrote: ----

What have you tried. did you try Ivan's code
--
Regards
Tom Ogilv




Timmothy Gransbury said:
This is a re-post and hopefully with one of the replies I got the las
time I can say this a little clearer and hopefully someone may know
solution to my problemminutes to run (automates process and data collection and creating reports
hundreds of files). I use windows XP and at work, I have the problem of th
screen saver kicking on part way through and it creates a problem for som
of my code. Harold Staff explained it best in his reply "Some networ
policies re-enables the screensaver automatically at certain intervals t
ensure that all workstations are password protected after some time o
"inactivity" -unfortunately defined only as mouse/keyboard activity." Thi
is the exact situation I am in. Is there any way to disable this from VBA
I have tried several codes for disabling the screensaver but non of the
seem to work. My other thought is to do something to make the computer sta
active, and insert it into the code I have (22 modules and over 300 pages)
I could really use some help and guidance on this. Is this even possible t
do, prevent the "inactivity lock-out"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top