+ Reply to Thread
Results 1 to 5 of 5

Run code each half hour (12:00;00:30;01:00..23:00;23:30)

  1. #1
    Valued Forum Contributor
    Join Date
    03-17-2012
    Location
    Warsaw, Poland
    MS-Off Ver
    2007/2010
    Posts
    555

    Run code each half hour (12:00;00:30;01:00..23:00;23:30)

    Hi all,

    probably a very simple one for most of you. I'd like to run a code automatically each half hour. I know I have to put a workbook_open event first that redirects to the code and another line or two that will execute the code again and again.

    Thanks
    If you think that my answer was helpful, please click on the "Add to this user's Reputation" button.

  2. #2
    Forum Contributor
    Join Date
    02-28-2013
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    272

    Re: Run code each half hour (12:00;00:30;01:00..23:00;23:30)

    Use:

    Please Login or Register  to view this content.
    Please consider adding a * if I helped

  3. #3
    Forum Expert JasperD's Avatar
    Join Date
    05-07-2013
    Location
    Netherlands
    MS-Off Ver
    Excel 2016
    Posts
    1,393

    Re: Run code each half hour (12:00;00:30;01:00..23:00;23:30)

    If you dont want it to run at a set time, but just every 30 mins after you opened the file and ran the code for the first time, then put the code below in your vba before the "end sub"

    Please Login or Register  to view this content.
    Please click the * below if this helps
    Please click the * below if this helps

  4. #4
    Valued Forum Contributor
    Join Date
    03-17-2012
    Location
    Warsaw, Poland
    MS-Off Ver
    2007/2010
    Posts
    555

    Re: Run code each half hour (12:00;00:30;01:00..23:00;23:30)

    Thanks guys. But is there a chance to make it work for every half and full hour during the day? I mean i could use the code given by wfm007 and expand it, but I'd like to avoid copying the same line 48 times.

    Cheers!

  5. #5
    Forum Expert JasperD's Avatar
    Join Date
    05-07-2013
    Location
    Netherlands
    MS-Off Ver
    Excel 2016
    Posts
    1,393

    Re: Run code each half hour (12:00;00:30;01:00..23:00;23:30)

    Hi Bishonen,

    Let's assume your VBA is called "TEST"
    So do as follows :

    Please Login or Register  to view this content.
    Please click the * below if this helps

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] relative references? Converting half hour incriments into hour incriments
    By Babbabooie in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-07-2012, 11:27 AM
  2. Rounding to nearest half hour
    By kjambug in forum Excel General
    Replies: 3
    Last Post: 11-11-2010, 03:06 PM
  3. [SOLVED] Adding half an hour to a time value
    By DaZombie in forum Excel General
    Replies: 7
    Last Post: 10-25-2010, 11:41 AM
  4. Update cell every half hour
    By excelmaster5000 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-26-2008, 04:46 AM
  5. [SOLVED] Calculate time difference to the half hour
    By Ken Ivins in forum Excel Formulas & Functions
    Replies: 18
    Last Post: 09-06-2005, 03:05 PM

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