locked
Combine two worksheet change events to allow macros to run automatically RRS feed

  • Question

  • Dear All,

     

    I have a spread sheet which I use to record the results of tests performed on solutions before they are used in analysis.  I want the spread sheet to indicate to the user whether the solution can be used or should be discarded and I have written a macro for this purpose.  I want the macro to run automatically when the results of the testing are entered on the spread sheet.  One solution has three tests performed and the other has four tests.  In both cases all tests must fall within the defined criteria for the solution to be deemed acceptable for use.  I was hoping to post a link to my project at this point but I am not allowed to do that until my account has been verified.  I shall post the link as soon as it is possible to do so.


    Both macros can be run successfully but only the macro for MAMD can run automatically.  The Macro for 0.9% SCS can only be run manually.  I would like to combine these two worksheet change events successfully so that a pass or fail is assigned when the required results for either solutions are entered on the spread sheet.

    This is my first visit to the Developer's network so please accept my apologies if I have not posted my question in the right forum.

     

    Kind Regards

    Thunder Hill

    Tuesday, May 9, 2017 5:00 PM

All replies

  • If you are working with Excel then you would want the Excel for Developers forum:

    https://social.msdn.microsoft.com/Forums/office/en-US/home?forum=exceldev


    Paul ~~~~ Microsoft MVP (Visual Basic)

    Tuesday, May 9, 2017 5:10 PM
  • Hi Paul,

    Thank you very much for pointing me in the right direction.

    Kind Regards

    Thunder Hill.

    Tuesday, May 9, 2017 7:49 PM
  • Dear All,

    The link to my project is given below:

    https://1drv.ms/x/s!Ar5V80AiHDWPhA4EJDSWhsGch1sr

    Kind Regards

    Thunder Hill

    Tuesday, May 9, 2017 7:50 PM
  • Hello,

    If you want to work with events, we need to write the event hanlder in the corresponding object. For more information, please visit Running VBA Code When Events Occur in Excel 2010

    About Workbook events like Workbook_Open() Workbook_BeforeClose(), we need to put the code in "ThisWorkbook"

    For worksheet event Worksheet_Change(), we need to put it into corresponding sheet.

    Regards,

    Celeste


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, May 10, 2017 6:32 AM
  • Hi Celeste,

    Thank you for your guidance and the reference material.  I have found it very helpful.

    Regards

    Thunder Hill

    Monday, May 15, 2017 9:02 PM
  • Hello,

    If your issue has been resolved, I suggest you mark helpful post or your solution as answer to close this thread.

    If you still has problem with current issue, please let me know.

    Regards,

    Celeste


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, May 16, 2017 2:33 AM