+ Reply to Thread
Results 1 to 3 of 3

A macro that stops the machine from logging off

  1. #1
    Forum Contributor
    Join Date
    03-21-2007
    Posts
    118

    A macro that stops the machine from logging off

    This is the problem.

    The computer I am working on auto-logs off after 10 minutes if I don't touch anything.

    I have created a macro that performs some calculations at a specific time of day and I need to keep the machine running 24/7 so that the calculations are performed everyday at the same time.

    How can I prevent the computer logging off?

    I thought of putting an application.ontime code on the Workbook_open that would activate (or switch) the workbook or a worksheet every 5 minutes but it doesn't seem to work.

    Any ideas?

    Is there a way to run a macro in the background without blocking the execution of other macros? (my calculation macro is an application.ontime event as well).


    Regards,

    K.
    _-= Have you google'd your question before posting? =-_
    _-= Have you Searched the forum for an answer before posting? =-_

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967
    You could try running a second instance of Excel or another application such as Word with a macro language.
    Martin

  3. #3
    Forum Contributor
    Join Date
    03-21-2007
    Posts
    118
    Thanks mrice,

    I actually did something simpler, I used the following bit of code:

    Please Login or Register  to view this content.
    act2 is the following macro (which needs to be in a module)

    Please Login or Register  to view this content.
    What the act2 macro does is to save the current workbook every nine minutes (the %FS is sending the keystroke alt+f+s)

    Therefore every nine minutes the act2 macro is executed.
    At the time specified in the workbook_open code the realmacro (the macro that has my calculations and that I want to run) runs.


    Regards,

    K.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1