PDA

View Full Version : Solved: any method to overide the auto logoff during VBA running...?



beginner
08-03-2005, 11:31 AM
hello all helpers...

would like to seek help if any methods to overide the Auto logoff feature (either by VBA code or others....) the system used is win2000 client which was set to auto log off within 15 mins.

However, the VBA application running around 30 mins, so always need manually moving the mouse to avoid the workstation auto logoff....

Any methods (not allow to do anything at server side or any config. changed.) can be achieved in VBA or others at client workstation is very much appreciated..!

BR/
Beginner :help

xCav8r
08-03-2005, 04:49 PM
Have you tried sending keys?

beginner
08-04-2005, 09:53 AM
hi xCav8r......would you elaborate a bit more as i am sure what kind of keys you referring to & how to send it....appreciate any code sample ? Tks. a lot!

BR/
beginner

xCav8r
08-04-2005, 03:36 PM
You can use a macro or procedure. If you want samples for the procedure route, do a search in the VBE help for SendKeys.

beginner
08-04-2005, 10:40 PM
hi xCav8r, tks for your tips, i'll try figuring out the Sendkeys method first. tks.

xCav8r
08-08-2005, 08:30 PM
Figure it out?

beginner
08-09-2005, 01:03 PM
hi xCav8r.....i figure it out finally the syntax as below by using the SendKeys method, i pick up the "Alt" (%) key to send to the active window regularly to bypass the auto logoff. it work but i am not sure while it keep sending the "Alt" key will this cause any bad impact or not.


Dim oWSH As Object

Set oWSH = CreateObject("WScript.Shell")

oWSH.SendKeys "%"


Anyway, Thank you for your tips!

xCav8r
08-09-2005, 03:51 PM
Open up a word document and send keys to that while you're running what you need to run in Access. Would that work?

beginner
08-09-2005, 08:03 PM
hi xCav8r......i will try that later after figuring out those coding syntax to send keys to word document. tks.

xCav8r
08-09-2005, 08:50 PM
AFAIK, it's the same for all office apps. Don't fret the differences.

beginner
08-10-2005, 10:27 PM
i see.....but i think i will keep it the way it is for the time being as it seems still working ok. so i will mark this thread solved and tks for your help & tips.!

xCav8r
08-11-2005, 09:49 PM
I'm glad that I was able to help! You do pretty well with a little advice.

BTW, according to your TZ, you're Pacific Time. What country are you in?

beginner
08-12-2005, 09:52 AM
hi...from Hong Kong....oh btw congratulation to your recent promotion to Moderator! Notice you help quite a lot here in this forum.!

xCav8r
08-12-2005, 07:56 PM
I'm so gonna get a bad reputation as the Time Zone Cop: http://www.timeanddate.com/worldclock/city.html?n=102. Your time zone in your forum profile should be set to GMT + 8 with no adjustment for Daylight Savings Time. Right now your TZ is set to what we call in North America the "Atlantic" time zone. I only mention this because I'm obsessed with knowing the time of the people with whom I'm corresponding. ;)

And, thanks. :cloud9:

beginner
08-14-2005, 09:12 AM
hi xCav8r.....i can't find the Time Zone setting screen but only i have edited my profile and put a flag of my country there and i believe this will set the correct time zone ,right ? if not, pls let me know where to set the Time Zone...tks.

xCav8r
08-14-2005, 09:25 AM
Nice flag. It doesn't change your time zone though. For that, do...

Quick Links -> Edit Options -> Date & Time Options

or just click here...

http://www.vbaexpress.com/forum/profile.php?do=editoptions

:wink:

beginner
08-18-2005, 12:00 PM
hi ...tks.....i done the timezone success already i think....:yes