+ Reply to Thread
Results 1 to 2 of 2

VBA to loop through scheduled time and run the macro

  1. #1
    Forum Contributor
    Join Date
    07-16-2012
    Location
    Fort Worth, Texas
    MS-Off Ver
    Excel 2010
    Posts
    378

    VBA to loop through scheduled time and run the macro

    Hello,

    I have a [Macro Code] where I need it to run based on the list of scheduled time on each row. I would like it automatically loop through the scheduled time in cell [I13:I40] and will run this [Macro Code]

    For example:

    If cell I13= 10/3/2018 5:00PM, then cell E13 select and active and the [Macro Code] is being executed.

    I will have different scheduled time from range I13:I40, as the workbook is opened it should automatically loop through the range and when time is up it will execute the code.

    Please help

  2. #2
    Forum Expert
    Join Date
    06-09-2010
    Location
    Australia
    MS-Off Ver
    Excel 2013
    Posts
    1,714

    Re: VBA to loop through scheduled time and run the macro

    Hi
    I'm not 100% sure this is what you're after, but it may help

    I'm assuming a series of dates/time arranged in ascending order in a named range "times". This macro will find the cell with a value before the current time but with the following cell later than the current time:

    Please Login or Register  to view this content.
    this macro will return all cells with a time earlier than the current time:

    Please Login or Register  to view this content.
    to run a macro automatically when the spreadsheet opens, call it auto_open

    Please Login or Register  to view this content.

+ 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. Calculating scheduled time
    By lllboredlll in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-23-2014, 06:43 PM
  2. Number of Employees Scheduled Before and After Time Periods
    By Rigged in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-02-2013, 02:32 PM
  3. scheduled work exceeding available time
    By cp49321 in forum Excel General
    Replies: 4
    Last Post: 01-20-2013, 02:28 PM
  4. Replies: 1
    Last Post: 10-31-2012, 10:11 PM
  5. Replies: 3
    Last Post: 03-27-2012, 01:07 PM
  6. Excel macro's to run at a scheduled time
    By Pramod Kamath in forum Excel General
    Replies: 1
    Last Post: 08-15-2006, 09:10 AM
  7. [SOLVED] Run a Macro via a Scheduled Time
    By John in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-14-2006, 06:00 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