+ Reply to Thread
Results 1 to 6 of 6

Macro to run after 30 seconds

  1. #1
    Forum Contributor
    Join Date
    04-03-2009
    Location
    USA, California
    MS-Off Ver
    Excel 2007
    Posts
    385

    Macro to run after 30 seconds

    Is there a way to make a macro delay for like 30 seconds before it does its thing? What I'm trying to do is have something turned off before the spreadsheet is saved, and after the spreadsheet is saved have a macro that runs 30 seconds afterwards to turn said feature back on. On error this macro will simply terminate.
    Last edited by randell.graybill; 09-30-2009 at 01:51 AM.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Macro to run after 30 seconds

    Hello Randell,

    Here is simple macro to wait for 30 seconds...
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Forum Contributor
    Join Date
    04-03-2009
    Location
    USA, California
    MS-Off Ver
    Excel 2007
    Posts
    385

    Re: Macro to run after 30 seconds

    Thanks Leith.

  4. #4
    Forum Contributor
    Join Date
    04-03-2009
    Location
    USA, California
    MS-Off Ver
    Excel 2007
    Posts
    385

    Re: Macro to run after 30 seconds

    I tried it leath but the code stops the whole thing from running during the time the timer is set to wait...I want it to save first then wait 30 seconds not wait 30 then save.

  5. #5
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Macro to run after 30 seconds

    Hello Randell,

    Call the macro "Delay Test" after your save the workbook. Like this...
    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    04-03-2009
    Location
    USA, California
    MS-Off Ver
    Excel 2007
    Posts
    385

    Re: Macro to run after 30 seconds

    Beautiful, works like a charm thanks.

+ 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