+ Reply to Thread
Results 1 to 4 of 4

Run Macro when date changed

  1. #1
    Forum Contributor
    Join Date
    09-05-2012
    Location
    Dubai
    MS-Off Ver
    Office 365
    Posts
    409

    Run Macro when date changed

    Hi,
    I am looking to run a macro when date changed in system...

    what can be my code......

    can some one help here...





    regards

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

    Re: Run Macro when date changed

    Do you want to run a macro at midnight? Or do you mean that the date was changed by the user through the control panel?
    Bernie Deitrick
    Excel MVP 2000-2010

  3. #3
    Forum Contributor
    Join Date
    09-05-2012
    Location
    Dubai
    MS-Off Ver
    Office 365
    Posts
    409

    Re: Run Macro when date changed

    When date changes in system automatically, my macro should run.....when my system is on....

    it means, daily 1 time macro will run.....

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

    Re: Run Macro when date changed

    If your system is on all the time, you can schedule a macro to run once per day. If you turn off your system, you can use a workbook open event to run the macro and record that it has been run (in case the workbook is closed, then re-opened).

    For the second case, in the workbook that has the macro, named RunMeOncePerDay and a sheet named "Sheet1", code like this, copied into the code module of the ThisWorkbook object, will run the macro once when the workbook is opened (if you use Personal.xlsb then it will be opened every time you start Excel):

    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. When the cell date is changed then macro should run
    By aman1234 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-25-2014, 11:31 AM
  2. Replies: 7
    Last Post: 05-07-2014, 02:01 AM
  3. [SOLVED] Excel Macro That Changes Things when the date is changed?
    By frahmed99 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-25-2013, 08:22 AM
  4. Run a macro when the date is changed..
    By SARC777 in forum Excel General
    Replies: 4
    Last Post: 08-23-2010, 08:12 PM
  5. How to detect row changed date and time? Is it need to write a macro?
    By cheeloont in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-12-2010, 11:29 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