+ Reply to Thread
Results 1 to 24 of 24

Macro not trigger on cell value change

  1. #1
    Registered User
    Join Date
    10-10-2013
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    18

    Macro not trigger on cell value change

    Dear Friends,

    The below mentioned code does not run when a cell value change/update/enter by another macro in a range but working fine when i manually enter "Yes" in mentioned range and shoot the mail with corresponding data related to that row. I am stuck here and almost spend a week to find solution on this.

    I am sure someone will help me here to solve this as i have limited knowledge of VBA.

    Here is my code which shoot call another macro to send email.

    Note : The value "Yes" entered by another macro in the range, after that this code detect and shoot the mail.

    Please Login or Register  to view this content.

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Macro not trigger on cell value change

    Quote Originally Posted by jeetusaini85 View Post
    The below mentioned code does not run when a cell value change/update/enter by another macro in a range but working fine when i manually enter "Yes"
    That macro may be turning off the events


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Registered User
    Join Date
    10-10-2013
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    18

    Re: Macro not trigger on cell value change

    Hi Sixthsense,

    Thanks for your reply. As i said i have limited knowledge of VBA, can you please guide me to correct this code as per my requirement.

    How can i turning on the events in the codes.

    Thanks.

  4. #4
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Macro not trigger on cell value change

    Please post your another macro code for doing correction

  5. #5
    Registered User
    Join Date
    10-10-2013
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    18

    Re: Macro not trigger on cell value change

    Sixthsense,

    The another macro is mentioned below. This macro basically for update the status records.

    Please Login or Register  to view this content.

  6. #6
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Macro not trigger on cell value change

    Quote Originally Posted by jeetusaini85 View Post
    The another macro is mentioned below. This macro basically for update the status records.
    I don't see any line of code to enter text "yes" in cell in your another macro.

    Then how the worksheet change code will run?

  7. #7
    Registered User
    Join Date
    10-10-2013
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    18

    Re: Macro not trigger on cell value change

    Sixthsense,

    The below line is entered / update by this macro in sheet "PartsData".

    Please Login or Register  to view this content.
    "UpdateEntry" is named range of data to be update from sheet "Input" to sheet "PartsData".

    Hope, i clear myself on this.

  8. #8
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Macro not trigger on cell value change

    These 3 conditions needs to be fulfilled to trigger the worksheet change event.

    Please Login or Register  to view this content.
    Meaning of the below line - Change should happen in one cell otherwise it will exit the change event

    Please Login or Register  to view this content.
    Meaning of the below line - Change should happen in the range R1:R5001 otherwise it will exit the change event

    Please Login or Register  to view this content.
    Meaning of the below line - Changing Cell (Single Cell) VALUE should be lower case "yes" otherwise it will exit the change event

    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    10-10-2013
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    18

    Re: Macro not trigger on cell value change

    Yes, u r right but why this not running?

    I want to change only 1 cell at one time in mentioned range. What is wrong in this? Now let me clear myself on this again.....

    I have an excel sheet in which I have two sheets 1 is "Input" and 2 is "PartsData".
    In "Input" sheet I have a form in vertical position which fill by the user and on click a buttone a macro run and enter this filled details to "PartsData" by copy paste method with transpose. Now if any records needs to update the user find that recrod by its unique number from sheet "Input" by Workheet_Change event (another macro) and all the details releted to that number visible in fields and after updation of recrod my 2nd macro which i have provided to you update the same(with extra field of "Yes" and "No"). If "Yes" found in coloum range then i want to execute my mail macro.

  10. #10
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Macro not trigger on cell value change

    Still you are not understanding what I am trying to say...

    Please read my Post #6 content once again to get clarity

  11. #11
    Registered User
    Join Date
    10-10-2013
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    18

    Re: Macro not trigger on cell value change

    ok, i got your point...

    "Yes" is a part of data name range "UpdateEntry". When this macro runs, data under "UpdateEntry" range copy from sheet "Input" and paste into sheet "PartsData".

    I am sorry if i am not clear but i am stuck and i think i am bothering you.

  12. #12
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Macro not trigger on cell value change

    Run the code in break mode and check in which line it fails.

    Or

    Attach a sample workbook

  13. #13
    Registered User
    Join Date
    10-10-2013
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    18

    Re: Macro not trigger on cell value change

    Can you please guide me how to attach a workbook here?

  14. #14
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Macro not trigger on cell value change

    Attach a sample workbook. Make sure there is just enough data to make it clear what is needed. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are demonstrated, mock them up manually if needed. Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic

  15. #15
    Registered User
    Join Date
    10-10-2013
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    18

    Re: Macro not trigger on cell value change

    its not allowing me to attach file as file size is exceeded the limit. 5.56 MB...

  16. #16
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Macro not trigger on cell value change

    Add it in Zip and attach it. Since Zip have 10 MB capacity

  17. #17
    Registered User
    Join Date
    10-10-2013
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    18

    Re: Macro not trigger on cell value change

    Hi,

    Please check. Hope this will help you to resolve the issue.

    auto macro run example.zip

  18. #18
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Macro not trigger on cell value change

    Your codes and references:-

    Set myCopy = inputWks.Range("UpdateEntry")

    UpdateEntry=Input!$C$3:$C$18

    myCopy.Copy

    UpdateEntry is a single Cell? It consist 15 cells.

    Change event code

    Please Login or Register  to view this content.
    According to above line Pasting should happen in single cell, but your copy range consist 15 cells and the if statement will end the code.

  19. #19
    Registered User
    Join Date
    10-10-2013
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    18

    Re: Macro not trigger on cell value change

    Ok, so how can i resolve this?

  20. #20
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Macro not trigger on cell value change

    Replace your current (PartsData) worksheet Change Event with this one

    Please Login or Register  to view this content.

  21. #21
    Registered User
    Join Date
    10-10-2013
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    18

    Re: Macro not trigger on cell value change

    I have tried your code and it gives me error "Run-time error'1004':Application-defined or object-defined error" at below mention line:

    Please Login or Register  to view this content.
    also after updating the records its not clear contents of the form field.

  22. #22
    Registered User
    Join Date
    10-10-2013
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    18

    Re: Macro not trigger on cell value change

    R u there buddy?

  23. #23
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Macro not trigger on cell value change

    I am replying from mobile device now so i am unabe to edit your code.

    Replace all target with Target.cells(16) in the below code.

    Please Login or Register  to view this content.

  24. #24
    Registered User
    Join Date
    10-10-2013
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    18

    Re: Macro not trigger on cell value change

    Sixthsense,

    Heads off to you, you are a life savior. The code works perfect as expected. Thank you very much for your time and resolution.

    Thanks,

+ 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. Change of value in a cell don't trigger macro
    By tuf82 in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 09-01-2011, 09:50 AM
  2. Trigger Macro on change in cell value
    By qwerty in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-26-2006, 12:30 AM
  3. [SOLVED] Cell change to trigger Macro
    By Sören_Marodören in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-11-2006, 06:15 AM
  4. [SOLVED] Cell value change to trigger macro (worksheet change event?)
    By Neil Goldwasser in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-10-2006, 10:00 AM
  5. Cell Data Change to Trigger Macro
    By documike in forum Excel General
    Replies: 8
    Last Post: 01-06-2005, 03:06 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