+ Reply to Thread
Results 1 to 4 of 4

VBA - Run Macro from a predefined list of times

  1. #1
    Registered User
    Join Date
    05-29-2014
    Posts
    5

    VBA - Run Macro from a predefined list of times

    I've seen a lot of traffic around running macro's on a clock at regular intervals. But what if I want to run a Macro (Macro1) at 8:55, 9:55, 11:55, 12:55, 13:55, 16:55 and another Macro (Macro2) at the top of each of those hours? The string of times is not consecutive, so I have built a table to define the release times. At each of these times I need to run a macros, and I'm not sure where to begin.

    Thanks in advance!

  2. #2
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,938

    Re: VBA - Run Macro from a predefined list of times

    Use another macro to schedule those macros. In the same workbook / same module, use code like this, that you run before 8:55 AM:

    Please Login or Register  to view this content.
    Bernie Deitrick
    Excel MVP 2000-2010

  3. #3
    Registered User
    Join Date
    05-29-2014
    Posts
    5

    Re: VBA - Run Macro from a predefined list of times

    I would need some code to construct this Macro, as the list can vary. Today it may be 3 times, tomorrow it may be 50. So based on user input the macro would be constructed... again something new for me.

  4. #4
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,938

    Re: VBA - Run Macro from a predefined list of times

    Create a table, on a sheet named "Schedule" with the macro names in row 1 starting in column A. Below each macro name, place the required times to run them, in whatever time format you prefer. If you don't want to run a specific macro that day, just leave all the cell below its name blank.

    Then use this macro:

    Please Login or Register  to view this content.
    Last edited by Bernie Deitrick; 06-25-2014 at 01:14 PM.

+ 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] if data from predefined list does not exist in row, add it to the row
    By tetrandra in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 05-13-2013, 01:49 AM
  2. Replies: 1
    Last Post: 05-03-2012, 10:50 AM
  3. Replies: 6
    Last Post: 06-19-2009, 09:17 AM
  4. Replies: 3
    Last Post: 10-27-2008, 08:32 AM
  5. Sorting data by a predefined List
    By camcrazy08 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-25-2007, 06:18 PM

Tags for this Thread

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