Consulting

Results 1 to 17 of 17

Thread: Solved: any method to overide the auto logoff during VBA running...?

  1. #1
    VBAX Regular
    Joined
    May 2005
    Posts
    62
    Location

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

    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

  2. #2
    VBAX Expert xCav8r's Avatar
    Joined
    May 2005
    Location
    Minneapolis, MN, USA
    Posts
    912
    Location
    Have you tried sending keys?

  3. #3
    VBAX Regular
    Joined
    May 2005
    Posts
    62
    Location
    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

  4. #4
    VBAX Expert xCav8r's Avatar
    Joined
    May 2005
    Location
    Minneapolis, MN, USA
    Posts
    912
    Location
    You can use a macro or procedure. If you want samples for the procedure route, do a search in the VBE help for SendKeys.

  5. #5
    VBAX Regular
    Joined
    May 2005
    Posts
    62
    Location
    hi xCav8r, tks for your tips, i'll try figuring out the Sendkeys method first. tks.

  6. #6
    VBAX Expert xCav8r's Avatar
    Joined
    May 2005
    Location
    Minneapolis, MN, USA
    Posts
    912
    Location
    Figure it out?

  7. #7
    VBAX Regular
    Joined
    May 2005
    Posts
    62
    Location
    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.

    [VBA]
    Dim oWSH As Object

    Set oWSH = CreateObject("WScript.Shell")

    oWSH.SendKeys "%"
    [/VBA]

    Anyway, Thank you for your tips!

  8. #8
    VBAX Expert xCav8r's Avatar
    Joined
    May 2005
    Location
    Minneapolis, MN, USA
    Posts
    912
    Location
    Open up a word document and send keys to that while you're running what you need to run in Access. Would that work?

  9. #9
    VBAX Regular
    Joined
    May 2005
    Posts
    62
    Location
    hi xCav8r......i will try that later after figuring out those coding syntax to send keys to word document. tks.

  10. #10
    VBAX Expert xCav8r's Avatar
    Joined
    May 2005
    Location
    Minneapolis, MN, USA
    Posts
    912
    Location
    AFAIK, it's the same for all office apps. Don't fret the differences.

  11. #11
    VBAX Regular
    Joined
    May 2005
    Posts
    62
    Location
    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.!

  12. #12
    VBAX Expert xCav8r's Avatar
    Joined
    May 2005
    Location
    Minneapolis, MN, USA
    Posts
    912
    Location
    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?

  13. #13
    VBAX Regular
    Joined
    May 2005
    Posts
    62
    Location
    hi...from Hong Kong....oh btw congratulation to your recent promotion to Moderator! Notice you help quite a lot here in this forum.!

  14. #14
    VBAX Expert xCav8r's Avatar
    Joined
    May 2005
    Location
    Minneapolis, MN, USA
    Posts
    912
    Location
    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.

  15. #15
    VBAX Regular
    Joined
    May 2005
    Posts
    62
    Location
    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.

  16. #16
    VBAX Expert xCav8r's Avatar
    Joined
    May 2005
    Location
    Minneapolis, MN, USA
    Posts
    912
    Location
    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/prof...do=editoptions


  17. #17
    VBAX Regular
    Joined
    May 2005
    Posts
    62
    Location
    hi ...tks.....i done the timezone success already i think....

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •