+ Reply to Thread
Results 1 to 6 of 6

Auto running macro

Hybrid View

  1. #1
    Registered User
    Join Date
    04-05-2012
    Location
    uk
    MS-Off Ver
    Excel 07
    Posts
    77

    Auto running macro

    Hi can anyone tell me how I can make my macro keep repeating itself over and over again with out stopping ?

  2. #2
    Registered User
    Join Date
    12-18-2012
    Location
    Brisbane, Australia
    MS-Off Ver
    Excel 2010
    Posts
    47

    Re: Auto running macro

    do
    'code
    loop

  3. #3
    Registered User
    Join Date
    04-05-2012
    Location
    uk
    MS-Off Ver
    Excel 07
    Posts
    77

    Re: Auto running macro

    Hi j450n can you explain what I have to do in a little more detail please .

  4. #4
    Registered User
    Join Date
    12-18-2012
    Location
    Brisbane, Australia
    MS-Off Ver
    Excel 2010
    Posts
    47

    Re: Auto running macro

    what is your macro supposed to do? can you post some sample code please.
    It's not good practice to have an endless looping macro, like all things it needs to end sometime but what condition is needed to make it stop running???

  5. #5
    Registered User
    Join Date
    04-05-2012
    Location
    uk
    MS-Off Ver
    Excel 07
    Posts
    77

    Re: Auto running macro

    Basically my macro searches cell n to see what time is in it and once it's ten mins before that time it stays red until cell o says yes but it needs to run all day

  6. #6
    Registered User
    Join Date
    12-18-2012
    Location
    Brisbane, Australia
    MS-Off Ver
    Excel 2010
    Posts
    47

    Re: Auto running macro

    go into the VBE (Alt+F11) hit f1 (help) and look up the Timer function - this has a good example to do what you need. But you should still consider having some machanism of stopping the endless loop, maybe you could use events like Workbook_Open to start the macro and Workbook_close to end it.

    Hope this helps

    Regards

    J450n

+ 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