+ Reply to Thread
Results 1 to 3 of 3

Schedule a macro to run

  1. #1
    Registered User
    Join Date
    08-13-2009
    Location
    Glasgow
    MS-Off Ver
    Excel 2016,2016,365
    Posts
    92

    Schedule a macro to run

    Hello,

    I want to scedule a macro to run in a workbook but that workbook does not contain the macro. So,

    I have a macro in outllook that saves a new workbook to a drive folder each morning.

    It is on that workbook that I want to deploy the macro on. So i want to open the workbook and run the macro but there is no macro in the workbook. Is this possible?

    If it also helps I have the macro(.bas) saved in the same folder.

    Hope that makes sense.

    P.S I have found video on youtube on how to schedule a macro but that is when the workbook contains the macro.

    Ross

  2. #2
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,014

    Re: Schedule a macro to run

    .
    Not certain I completely understand what you are wanting to do except .... run a macro at a specific time that affects a different workbook
    other than the workbook where the macro resides ???

    Anyway ... in short ... have you considered using the built-in feature of the Windows Scheduler ?

  3. #3
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: Schedule a macro to run

    Hi rosscortb,

    The following attached two files probably demonstrate what you want:
    a. ExcelForumProcessDataInAnotherWorkbookPerSchedule.xlsm - Excel file that controls scheduling and runs your macro
    b. ExcelForumProcessDataInAnotherWorkbookPerScheduleData.xlsx - Dummy Data File

    Instructions for use (Basic Mode):
    a. Put both files in the same folder
    b. Open the .xlsm file and 'Left Click' the 'Stop ...' Yellow Shape'
    c. Add your Macro to the file in an Ordinary Code Module.
    d. Select the day or days of the week you want your Macro to run
    e. Select Yes or No if you want your macro to run on Holidays that fall on an allowed day of the week
    f. Add holidays to the holiday list if you want your macro to run on Holidays
    g. Put the Time of Day you want your Macro to run and the Macro Name in the List
    h. Save the file
    i. Test to make sure everything works
    j. Select (Stop then) Reschedule All Macros
    NOTE: The Excel File MUST be open 24/7 and the computer can not be sleeping at the time the Macro is to run.

    Instructions for use (Advanced Mode):
    a. Perform all the 'Basic Mode' steps.
    b. Add the call to your Macro inside a Wrapper Function (see below).
    The Wrapper function will display when your Macro ran when you 'Left Click' the 'List ...' Yellow Shape.

    Typical code in Ordinary Code Module ModUserMacros (feel free to Modify):
    Please Login or Register  to view this content.
    Lewis

+ 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. Replies: 0
    Last Post: 12-05-2018, 07:24 AM
  2. Noob here- best approach to extract personal schedule based on an employee schedule sheet,
    By fortnight_skyrim in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-15-2018, 01:02 AM
  3. Tiered Interest Schedule and Loan Amortization Schedule
    By wh1968mbz in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-28-2015, 07:43 AM
  4. Replies: 8
    Last Post: 07-15-2013, 07:13 PM
  5. create daily schedule using master task schedule
    By DCO in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-13-2012, 01:08 PM
  6. Macro - schedule people for training based off their schedule and available training
    By downed_pipper1 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-30-2009, 04:59 PM
  7. Replies: 8
    Last Post: 10-12-2005, 12:05 AM

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