+ Reply to Thread
Results 1 to 5 of 5

Run a macro when the date is changed..

  1. #1
    Registered User
    Join Date
    08-12-2010
    Location
    Nuwara Eliya, Sri Lanka
    MS-Off Ver
    Excel 2007
    Posts
    54

    Run a macro when the date is changed..

    Hello,

    I have a simple code to continue a serial number every time i reopen a workbook,.. heres the code..

    Please Login or Register  to view this content.


    (this code was done for me by "Rizvisa)

    I would like to know if its possible for this formula to work only if i change the date on cell E7.

    Thanks....
    Last edited by SARC777; 08-23-2010 at 12:19 AM. Reason: SOLVED

  2. #2
    Valued Forum Contributor quekbc's Avatar
    Join Date
    01-18-2010
    Location
    Sydney, Australia
    MS-Off Ver
    2010, 2013, 2016
    Posts
    1,149

    Re: Run a macro when the date is changed..

    Yes, it is possible. To do so, go into the VB Editor (Alt+F11), on the top left, look for Sheet1 object and double click it.

    Insert the following code.

    Please Login or Register  to view this content.
    Also, I'd recommend using named ranges for these cells (A5 and E7) and using them in VBA to prevent future errors from adding in rows or columns.

  3. #3
    Registered User
    Join Date
    08-12-2010
    Location
    Nuwara Eliya, Sri Lanka
    MS-Off Ver
    Excel 2007
    Posts
    54

    Re: Run a macro when the date is changed..

    Ok thanks..

    Heres how i combined the 2 codes.. it diidnt work for .... could you help m out pls..

    Please Login or Register  to view this content.
    Thanks...

  4. #4
    Registered User
    Join Date
    08-12-2010
    Location
    Nuwara Eliya, Sri Lanka
    MS-Off Ver
    Excel 2007
    Posts
    54

    Re: Run a macro when the date is changed..

    My apologies,,.. your code works quekbc... Thanks again.................

  5. #5
    Valued Forum Contributor quekbc's Avatar
    Join Date
    01-18-2010
    Location
    Sydney, Australia
    MS-Off Ver
    2010, 2013, 2016
    Posts
    1,149

    Re: Run a macro when the date is changed..

    Excellent... that's good to hear.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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