+ Reply to Thread
Results 1 to 13 of 13

Auto run macro after entering/changing the date

  1. #1
    Forum Contributor
    Join Date
    12-15-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    672

    Auto run macro after entering/changing the date

    Hi friends,
    My data is in range 'b8:ae3000'
    Column 't' birthdate, column 'ae' today's age
    I want to run the macro 'AgeValue' after entering/changing the date in column 't'. At present I have inserted the call event in this workbook. As a result it runs each time I open the workbook. The birthdates in column 't' are not changing daily. It changes whenever I enter a new entry of contact but it is not daily. The AgeValue macro is running each time which I don't want. I want to save the time.

    So I want to run the 'AgeValue' macro after entering/changing the date in column 't' only and not each time. Is it possible? If so please suggest me a code.

    Thanking you in anticipation.

    Regards,

    Mukesh Baviskar

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Auto run macro after entering/changing the date

    In the SHEET module for this specific sheet, something like this:

    Please Login or Register  to view this content.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Contributor
    Join Date
    12-15-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    672

    Re: Auto run macro after entering/changing the date

    Thank you. I inserted the code int the sheet modul but I don't know how to link up it with the 'AgeValue' macro. The code is:

    Please Login or Register  to view this content.
    Please guide me.

    Thank you.

    Regards,

    Mukesh

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Auto run macro after entering/changing the date

    Just a guess... hopefuly this works or gives you enough info to adjust yourself to get you the rest of the way there:

    Please Login or Register  to view this content.
    Last edited by JBeaucaire; 03-08-2014 at 03:06 AM. Reason: Added missing =

  5. #5
    Forum Contributor
    Join Date
    12-15-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    672

    Re: Auto run macro after entering/changing the date

    Thank you. I'm getting error 438 Object doesn't support this type of method or property' on the line 'Cells(cell.Row, "AE").FormulaR1C1 _'.

    Thank you.

    Mukesh

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Auto run macro after entering/changing the date

    Copy the code again, restart your Excel, paste the new code in and try again.

  7. #7
    Forum Contributor
    Join Date
    12-15-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    672

    Re: Auto run macro after entering/changing the date

    Hi JBeaucaire,
    Excellent! Now it's working fine with correct output.

    Thank you for solving the problem.

    Sincerely,

    Mukesh

  8. #8
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Auto run macro after entering/changing the date

    Glad to help. Cheers.

  9. #9
    Forum Contributor
    Join Date
    12-15-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    672

    Re: Auto run macro after entering/changing the date

    Hi JBeaucaire,
    Sorry for posting here on a solved thread. But my revision is related to this thread and you created this macro so I post my revision request here. If it's breaking the forum rule please ignore it positively. I respect you and the forum rule.

    I want to reduce the size of file so I want to convert the formula range 'ae8:ae3000' to value. Is it possible? I tried 'value = value' but not success.

    Again sorry and request you to ignore if it didn't comply the forum rule.

    Thanking you.

    Sincerely,

    Mukesh

  10. #10
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Auto run macro after entering/changing the date

    Show me exactly what you tried, the whole code snippet, not just part of it, I can help correct your syntax only when I see it fully.

    Thanks.

  11. #11
    Forum Contributor
    Join Date
    12-15-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    672

    Re: Auto run macro after entering/changing the date

    Here is the code which is not converting formula into value.

    Please Login or Register  to view this content.
    Thank you.

    Sincerely,

    Mukesh

  12. #12
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Auto run macro after entering/changing the date

    How about this:

    Please Login or Register  to view this content.

  13. #13
    Forum Contributor
    Join Date
    12-15-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    672

    Re: Auto run macro after entering/changing the date

    Hello JBeaucaire,
    Excellent! Now it's working fine.

    Thank you very much.

    Have a nice day!

    Sincerely,

    Mukesh

+ 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. auto entering date and time
    By LLOYD6664 in forum Excel General
    Replies: 2
    Last Post: 02-20-2014, 01:10 AM
  2. Auto date keeps changing previous cells
    By Treecko in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 11-26-2013, 12:11 PM
  3. Replies: 0
    Last Post: 01-29-2013, 04:59 PM
  4. trying to auto populate based of changing a date
    By grenes in forum Excel General
    Replies: 1
    Last Post: 06-21-2011, 06:17 PM
  5. [SOLVED] auto dating after entering the first date
    By Jomo Watts in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-05-2005, 11:06 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